Welcome to WebmasterWorld Guest from 54.163.84.199

Forum Moderators: bakedjake

Cannot change user password, even as root

You are required to change your password immediately (password aged)

   
5:08 pm on Aug 14, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A user account password expired and I cannot change it, even as root!

#root# su theuser
You are required to change your password immediately (password aged)

Then ... nothing! I have to type control-c. I've also tried
$passwd theuser
Changing password for user theuser.

And again that's it. Any advice? This is a critical user on this system and some programs won't start without it. If I remove the user and add them back will that break anything else?

It's a Fedora box.

1:33 am on Aug 15, 2007 (gmt 0)

WebmasterWorld Senior Member encyclo is a WebmasterWorld Top Contributor of All Time 10+ Year Member



Totally untested, but have you tried the
usermod
to change the expiry date?
usermod
is available on my Ubuntu, Google says it's available in Fedora too. Something like:

usermod yourusername -e 2008-08-14

(See

man usermod
for a bit more info).
5:06 pm on Aug 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Turns out it was a strange case. On boot there is a command in rc.local to run a program as this user. I.e.
su -c "/bin/theprogram" theuser
This must have triggered the prompt to change the password and because of that I couldn't do anything to the user password (even change the expiration date but thanks encyclo ;) ).
So I needed to kill the su -c process by doing, e.g.:
ps auxww grep start

root 1468 0.0 0.0 5160 1104? S 11:11 0:00 /bin/sh /etc/rc3.d/S99local start
root 1616 0.0 0.0 5092 1028? S 11:11 0:00 su -c /bin/theprogram theuser
root 5222 0.0 0.0 4820 664 pts/0 S 16:19 0:00 grep start

then kill the pid's of the offenders.
Then I changed the password and set the expiration date to be a long time from now ;)

Luckily I found this which is what tipped me off on the solution:
[ashterix.blogspot.com...]

3:21 am on Aug 21, 2007 (gmt 0)

5+ Year Member



Just as a side note it doesn't look like you are changing the user as root directly.

There is no need to

root># su username
user>$ password username

As root you can just

root># password username
new password:
new password:

That will work.

4:23 am on Aug 21, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nope, I tried
passwd username
and it didn't work.
See the fifth line of text in my first post ;)
8:05 pm on Aug 21, 2007 (gmt 0)

5+ Year Member



Oh sorry, when you posted:

$passwd theuser

That ment to me that you where not root, since root would be

#passwd theuser

 

Featured Threads

Hot Threads This Week

Hot Threads This Month