On the Net

|Main Blog|Yearning|  

Words of God


About Linux News and OpenSource




and below are my posts....


Tuesday, May 30, 2006

Forcing user to change their password on their next log-on

I thought that on any linux distro, you can just issue the command below, as root of course..


passwd -e username


where username is the user you want to change its passwd on next logon. Very easy huh.. but hey, not all distro have that option, Mandriva, Redhat, Centos does not have that option on the "passwd" command. OpenSuse, Xandros, and SimplyMepis have that option, so you will see on the man page the -e option. So I thought that there is no way I could do that on the latter distros. I even post it on Mandriva and Centos users board, thinking that ther emight be a problem with my Mandriva box, maybe some package should be installed, but mine is just the same with their Mandy box. Then I got an answer from Centos board user (MarioT) about the alternative command:


chage -d 0 username



..the above command would do the same effect of the -e option of the command "passwd", thus forcing the user to change password on the next logon. If you want to look more, see the man page on your linux shell. Well, at least I could now force the users on my Mandriva Box to change passwd on their next logon just in case I need to assign a new one then for their privacy, let them change it on themselves. Honestly, I did'nt know the command "chage" would do the same... but now I know. Just showed that after years of using linux, am still a newbie.


Peace to all, hope they will find more survivor on Java Indonesia, as I write these, there are almost 5000 people declared dead.

May God Bless us all!

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home