-
November 10th, 2005, 12:41 PM
#1
Senior Member
Forcing users to change their passwords
I guess that I'm not the first who ask that but i didn't found anything.
I'm running FC 3 and I would like to create a user account that forces the user to change his/her password the first time he/she log in... I'm not using XWindows.
I do the following to create it:
Code:
adduser -m -s /bin/bash usrname
and then I set the password with:
Thank you all.
-
November 10th, 2005, 01:03 PM
#2
Hey,
You need to pass the ‐e option to the passwd command.
This in will force a user to change his/her password at the user’s next login.
Let's say the user name is bob then you would need to type as root :
passwd -e bob
The next time the user bob logs in he will get a message that he needs to change his password.
Hope this is what you were looking for.
[EDIT] I forgot to mention it is like this on a SUSE linux ...don't know if it is the same on a Fedora but I suppose it is...someone will correct me if I'm wrong ...there are some linux specialst here [/EDIT]
[EDIT2] Have you done a passwd --help in the console ? Isn't it in there ? [/EDIT2]
C.
Back when I was a boy, we carved our own IC's out of wood.
-
November 10th, 2005, 01:13 PM
#3
Senior Member
Hi, thank you for the answer.
I found this "-e" googling but it doesn't work for fedora
Any suggestion?
-
November 10th, 2005, 01:23 PM
#4
I found a command on a redhat forum ...seeming this is the prerunner to Fedora it might work but you will need to test it.
The command is "chage"
You can give extra options like "-M days" this will give you:
Specify the maximum number of days for which the password is valid. When the number of days specified by this option plus the number of days specified with the -d option is less than the current day, the user must change passwords before using the account.
source
see if you find this command on your system ?
Apparently it should exist in Fedora according to this site
C.
Back when I was a boy, we carved our own IC's out of wood.
-
November 10th, 2005, 04:50 PM
#5
Senior Member
Indeed that was the command!
What I want to do is not to set an expiring password policy but force the user to set a proper password the first time he/she logs in. After some man reading (it isn't very intuitive ocmmand ) I solved the point in that way:
Code:
chage -M 9999 -d 1 username
This sets the password expire date arround year 2033 and the last change of that password arround 1970, so the first time the user logs in he/she must change the password but afterwards it won't expire in 25 years....
Thank you very much, I really appreciate your help.
-
November 10th, 2005, 04:52 PM
#6
Thank you very much, I really appreciate tour help.
No prob..glad to help.
Back when I was a boy, we carved our own IC's out of wood.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|