homepage Welcome to WebmasterWorld Guest from 54.226.0.225
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
Forum Library, Charter, Moderators: bakedjake

Linux, Unix, and *nix like Operating Systems Forum

    
Cannot change user password, even as root
You are required to change your password immediately (password aged)
physics




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

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.

 

encyclo




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

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).

physics




msg:3423002
 5:06 pm on Aug 15, 2007 (gmt 0)

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...]

linsys




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

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.

physics




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

Nope, I tried
passwd username
and it didn't work.
See the fifth line of text in my first post ;)

linsys




msg:3428248
 8:05 pm on Aug 21, 2007 (gmt 0)

Oh sorry, when you posted:

$passwd theuser

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

#passwd theuser

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Hardware and OS Related Technologies / Linux, Unix, and *nix like Operating Systems
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved