1830234 Members
2053 Online
109999 Solutions
New Discussion

Change password

 
SOLVED
Go to solution
juno2
Super Advisor

Change password

Does anyone know whether there is a command in RedHat 7.0 to force a user to change his passwd at next logon just like HP's 'passwd -f' ?
Regards,
13 REPLIES 13
Mark Grant
Honored Contributor
Solution

Re: Change password

"passwd -e"
Never preceed any demonstration with anything more predictive than "watch this"
Huc_1
Honored Contributor

Re: Change password


There is a tool chage to manipulate/change user accounts have a look at man chage, I have this on my linux RH 9.0 but I think it is also on 7.0

the very short answer Mark Grant is the best for a one shot.

J-P
Smile I will feel the difference
juno2
Super Advisor

Re: Change password

[root@edp root]# passwd -e user1
passwd: bad argument -e: unknown option

I use RH 8 , but not support this option , do you have any idea ? thx.
Mark Grant
Honored Contributor

Re: Change password

Sorry Juno,

You have to be root to use the "-e" option. Forgot to mention that!
Never preceed any demonstration with anything more predictive than "watch this"
juno2
Super Advisor

Re: Change password

Hi Mark,

Thx reply, I find the solution for long time.

of course I use root to run passwd -e option , is it because we have the different version , what is your version of passwd ? Thx
juno2
Super Advisor

Re: Change password

Besides, I can't find this function , what is the function of "-e" ? thx

http://man.linuxquestions.org/index.php?query=chage&section=0&type=2
juno2
Super Advisor

Re: Change password

sorry , please ignore my previous message , i confused with the command "chage" .

juno2
Super Advisor

Re: Change password

I really can't find the option "passwd -e" , which version of passwd on RH 7 ? thx.
Huc_1
Honored Contributor

Re: Change password

Yes, your are right there is no -e option on my passwd in RH 9.0.

It must be on an other "Unix" (Ultrix,IRIX,True-64, HP-UX) that I have used I should heve consulted man page myself !!

Still chage is a way... so sort of Half right.

By the way I dont see how to do this from the man page of passwd on Linux RH 9.0

J-P
Smile I will feel the difference
Mark Grant
Honored Contributor

Re: Change password

Slackware is great! #passwd -?usage: passwd [-f|-s] [name] passwd [-x max] [-n min] [-w warn] [-i inact] name passwd {-l|-u|-d|-S|-e} name# Not sure which passwd Red Hat are using but perhaps you'd like to upgrade :)
Never preceed any demonstration with anything more predictive than "watch this"
Huc_1
Honored Contributor

Re: Change password

AH shalckware I use that one too but found I could not spell it so I change to something
I could spell
Did I miss the point here or am I the only one to miss the point here, but this is
beside the point, eurrr just wanted to point this out !

J-P
Smile I will feel the difference
David Andrews_3
New Member

Re: Change password

The -e option on passwd immediatley expires a user account, forcing them to change it when they next log on.

Just a thought...

Have you tried man passwd to see what options are available under your version?
aparna challagulla
Valued Contributor

Re: Change password

hi juno,

i think u did ask this question before as well -
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=224834
anyway i guess u r not yet clear about it.
i dont have RH 7.0 installed here so maybe u can do a man password to find the options available to u.
there is also a utility called linuxconf in which u can modify a user's password settings using the GUI.
pl go thro this document which might be of help to u
http://www.redhat.com/docs/manuals/linux/RHL-7-Manual/pdf/rhl-7rg.pdf
read chapter 3 on system configuration.

HTH
aparna
If you don't have time to do it right you must have time to do it over