Page 1 of 1

Changing Default SSH Password for letmeinssh.

Posted: Sun Apr 03, 2011 12:22 pm
by Regor
Hi

I am trying to change the default password for letmeinssh as recommended in the wiki at:

http://www.jogglerwiki.com/wiki/Ssh

In the command line I enter and experience this. The password update fails.

#passwd letmeinssh
passwd: no record of letmeinssh in /etc/shadow, using /etc/passwd
Changing password for letmeinssh
New password:xxxxxxxxx
Retype password:xxxxxxxxx
passwd: cannot update password file /etc/shadow
#

Anybody else experienced this and have a solution?

Regards

Re: Changing Default SSH Password for letmeinssh.

Posted: Mon Apr 04, 2011 10:19 am
by roobarb!
A quick and easy way to set your own username and password, once SSH is installed, is:

Code: Select all

echo "joggler:`cryptpw password`:0:0:Joggler:/:/bin/sh" >> /etc/passwd
Where 'joggler' is the username, 'password' is the password and 'Joggler' is the name associated with the account. Obviously, you can change these to whatever you like.

You can then use vi to remove the 'letmeinssh' entry in /etc/passwd.

Re: Changing Default SSH Password for letmeinssh.

Posted: Mon Apr 04, 2011 11:43 am
by Regor
by roobarb! » Mon Apr 04, 2011 9:19 am
A quick and easy way to set your own username and password, once SSH is installed, is:

Code: Select all
echo "joggler:`cryptpw password`:0:0:Joggler:/:/bin/sh" >> /etc/passwd


Where 'joggler' is the username, 'password' is the password and 'Joggler' is the name associated with the account. Obviously, you can change these to whatever you like.

You can then use vi to remove the 'letmeinssh' entry in /etc/passwd.
Hi roobarb!

I tried your suggestion and entered this:

echo “Regor:`cryptpw mypassword`:0:0:Joggler:/:/bin/sh” >> /etc/passwd
#

Then tried to login as Regor and got this error:

login as:Regor
Regor@192.168.x.x's password:
Access denied

Any ideas? Can still login as letmeinssh :) .

Regards

Re: Changing Default SSH Password for letmeinssh.

Posted: Tue Apr 05, 2011 1:01 pm
by Regor
Hi

I notice that the wiki http://www.jogglerwiki.com/wiki/Ssh has been updated since I posted my original question.
I have used vi to check /etc/password and /etc/shadow. There are no entries in either for any user.
Can any forum member advise where passwords are stored in the native O2 operating system.

Regards

Re: Changing Default SSH Password for letmeinssh.

Posted: Thu Apr 07, 2011 1:36 pm
by roobarb!
That's odd. So far as I know, /etc/passwd is definitely the place those details should live. Which method did you use to enable SSH?

Re: Changing Default SSH Password for letmeinssh.

Posted: Thu Apr 07, 2011 3:18 pm
by Regor
That's odd. So far as I know, /etc/passwd is definitely the place those details should live. Which method did you use to enable SSH?
Hi roobarb!

According to my file records on 31/01/2011 I downloaded the file 'joggler_enable_ssh_v0.1.zip' from the site http://birdslikewires.co.uk/articles/sq ... or-joggler.
I have just compared this with the version on the wiki and they are identical!

Regards
:?

Re: Changing Default SSH Password for letmeinssh.

Posted: Wed Apr 13, 2011 8:53 pm
by roobarb!
Regor wrote:
That's odd. So far as I know, /etc/passwd is definitely the place those details should live. Which method did you use to enable SSH?
Hi roobarb!

According to my file records on 31/01/2011 I downloaded the file 'joggler_enable_ssh_v0.1.zip' from the site http://birdslikewires.co.uk/articles/sq ... or-joggler.
I have just compared this with the version on the wiki and they are identical!

Regards
:?
Hmm, I don't host a copy (not one I link to, anyway) - must have been downloaded via the wiki.

You must have an /etc/passwd file with content. As far as I know that's the only way it would work at all. Could you try:

Code: Select all

cat /etc/passwd
and you should see the contents of the file. If you see a line containing the username you entered before, delete it using vi and try the command again. If you see nothing... then I'm afraid I'm stuck!

Re: Changing Default SSH Password for letmeinssh.

Posted: Thu Apr 14, 2011 9:05 pm
by Regor
:D :D :D
roobarb! You have cracked it. I entered the command you suggested: cat /etc/passwd and I was then able to see the content of the file. My attempts to change the user name and password were visible and I could see the differences between them and the entry for the default user letmeinssh. I was able to change/delete these attempts and can now log in with a different user name and password. I also found that by issuing the 'cat' command I could then use the 'vi' command to change the contents. The command vi /etc/passwd had not worked previously.
For the benefit of other interested forum members this is what I found:
I originally entered:
# echo “Regor:`cryptpw mypassword`:0:0:Joggler:/:/bin/sh” >> /etc/passwd
# exit
This I discovered produced an entry in /etc/passwd which started and terminated with a full stop.
The corresponding entry for letmeinssh does not have the full stops at the ends and has 'root' in the place of my Joggler entry.
I then tried:
# echo “Regor:`cryptpw mypassword`:0:0:root:/:/bin/sh” >> /etc/passwd
# exit
I found I was able to the log in with username 'Regor' and password 'mypassword'.
I can still log in as letmeinssh but I will remove its entry when I am confident user 'Regor' does have full root access.
Thanks roobarb! for the assistance.
:D :D :D

Re: Changing Default SSH Password for letmeinssh.

Posted: Tue Apr 19, 2011 7:06 pm
by roobarb!
No problem - you might find the SSH and SCP Enabler I wrote recently handy too - adds secure file copying (although you will need to change your password again afterwards).