2
1
I recently accidentally forgot my user password to my shell. I know the root password. How do I change the user password?
I figure it's something like
$su root
$passwd -[something] username
but I can't get it to work. Halp pls?
2
1
I recently accidentally forgot my user password to my shell. I know the root password. How do I change the user password?
I figure it's something like
$su root
$passwd -[something] username
but I can't get it to work. Halp pls?
3
just "passwd mechko" I think, if you're logged as root ? tried it ? as existing password use roots or mechko's (in this case roots)
-1
Old school, more powerful than necessary method:as root empty the password field for that user in /etc/passwd
or /etc/shadow
. Then you can login and change the password.
2no, don't, unless you know how to fix it when you break things. the passwd command exists for a reason. – user23307 – 2010-03-01T02:14:51.603
I'll keep that in mind for next time :D – Ritwik Bose – 2010-01-10T01:49:15.210
passwd $user
as root doesn't require providing the current password. – Blacklight Shining – 2013-10-07T12:49:55.893Thanks a lot. I was looking at man pages even before I tried changing it so I got confused :-p – Ritwik Bose – 2010-01-10T01:48:11.110