Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user profile

Status
Not open for further replies.

vti

Technical User
Feb 26, 2001
189
TR
Hi all
I want to put expire time to my whole users to change their password by their own by the date which i put (For example every 1st of the month).How can i set the users like this?

Any idea

I use Unix 4.0 f


Thanks.
 
Look at the manual page for the passwd command (do a man passwd). This should tell you all you need to know.

Greg.
 
i have looked before but i didn't see nothing about this question.

I use Digital Unix 4.0f
 
Hi,
passwd -d -n 0 -w 7 -x 90 $username; passwd -f $username. Will set the users password to expire 90 days from the date the command is run (e.g., today), 7 days before it will warn them that they have 7 days to change the password, the "-n 0" flag says that the minimum expiration date is 0 and the user will have to change the password at the next login after you'v issued the "passwd -f" to force the change. I tried using the -f and -d flag at the same time but it locked the users account each time, so now I do them seperately. Also, on a security conscious note, if you issue the force and the user doesn't already have a password assigned there will be no password until the user logs in, so I would do something like this (scriptwise) :
print -n 'username? ' #sets the $username
read username
passwd -d -n 0 -w 7 -x 90 $username
sleep 3
passwd $username
sleep 3
passwd -f $username


This script will prompt you for the username (to set the variable), then set the 90 day expiration with immediate change upon next login, ask you to set an initial password (for security purposes it's best) and then set the flag to force the user to change the password.
Hope this helps B-) d3funct
vanya43@yahoo.com
The software required `Windows 95 or better', so I installed Linux.

 
Hi d3funct
Thank you for your help
That script exactly what i want but unfortunetely i have no those options are.Maybe i need to change my security type,do you know how can i find out what is my current security type.?And how to change it to enchanged


Regards.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top