Changing Default SSH Password for letmeinssh.

General discussion relating to the O2 Joggler, from the default O2 setup, to alternative operating systems and applications.
Post Reply
Regor
Posts: 25
Joined: Fri Mar 04, 2011 6:03 pm
Location: Scotland

Changing Default SSH Password for letmeinssh.

Post 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
User avatar
roobarb!
Posts: 1769
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Changing Default SSH Password for letmeinssh.

Post 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.
BirdsLikeWires - Get fresh builds of Debian Bullseye, Bookworm, and Trixie for OpenFrame with the latest 5.10, 6.1, and 6.12 kernels! 8-)
Regor
Posts: 25
Joined: Fri Mar 04, 2011 6:03 pm
Location: Scotland

Re: Changing Default SSH Password for letmeinssh.

Post 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
Regor
Posts: 25
Joined: Fri Mar 04, 2011 6:03 pm
Location: Scotland

Re: Changing Default SSH Password for letmeinssh.

Post 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
User avatar
roobarb!
Posts: 1769
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Changing Default SSH Password for letmeinssh.

Post 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?
BirdsLikeWires - Get fresh builds of Debian Bullseye, Bookworm, and Trixie for OpenFrame with the latest 5.10, 6.1, and 6.12 kernels! 8-)
Regor
Posts: 25
Joined: Fri Mar 04, 2011 6:03 pm
Location: Scotland

Re: Changing Default SSH Password for letmeinssh.

Post 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
:?
User avatar
roobarb!
Posts: 1769
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Changing Default SSH Password for letmeinssh.

Post 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!
BirdsLikeWires - Get fresh builds of Debian Bullseye, Bookworm, and Trixie for OpenFrame with the latest 5.10, 6.1, and 6.12 kernels! 8-)
Regor
Posts: 25
Joined: Fri Mar 04, 2011 6:03 pm
Location: Scotland

Re: Changing Default SSH Password for letmeinssh.

Post 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
User avatar
roobarb!
Posts: 1769
Joined: Sat Mar 05, 2011 1:30 pm
Location: Salford, UK
Contact:

Re: Changing Default SSH Password for letmeinssh.

Post 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).
BirdsLikeWires - Get fresh builds of Debian Bullseye, Bookworm, and Trixie for OpenFrame with the latest 5.10, 6.1, and 6.12 kernels! 8-)
Post Reply