[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Looking for a one-time "change this password" script for login



On Tue, Nov 15, 2005 at 07:28:22PM -0800, ke6isf wrote:
Every now and again, as is prone to happening on any server, I will create
a new account for users, and set a generic password for them, and thusly
instruct them on how to change it - ssh in, 'passwd', use the password I
just issued them, and have them come up with a better password than the
generic thing I just issued them.  Problem is, though, that most of my
users are a little intimidated by the environment.

So that said, what I'm looking for is a simple script that, on creation of
an account, this script will wait for the new (l)user to log in via ssh,
welcome them, give them instructions on what precisely to do ("Change your
password now!"), ask for other miscellaneous options, and never come up
again, favoring the typical motd and whatever shell they want.

Is there a package I should look for, or is there a different (or
otherwise fairly standard) way I should go about doing this?

Would 'passwd -e username' as root do what you need? To quote the
manpage:

 If you wish to immediately expire an account's password,  you  can  use
 the -e option.  This in effect can force a user to change his/her
 password at the user's next login.

Wouldn't address them setting their favorite shell, etc, like you
mention but if they are intimidated by the environment in the first
place it's probably best to just use bash, the default, anyways.

--
Steve Block
http://ev-15.com/
http://steveblock.com/
scblock@ev-15.com



Reply to: