[SunHELP] Locked Accounts

Jarrett Carver solarboyz1 at hotmail.com
Wed Jan 7 23:25:48 CST 2004


>From the useradd(1M):
     The  new  login  remains  locked until the passwd(1) command is 
executed.

The easiest thing to do in your script, is to run `passwd -f $username 
$username`  immediatly after the useradd command. This will set the users 
password to be the same as their username, and expire the password so they 
will be required to change it on next login.

A more secure way would be for your script to generate a random password, 
and then after the account is added, the script could print out a paper with 
the username and password assigned.  This prevents the possibility of 
someone exploiting one of the weak passwords before the new user logs in for 
the first time.



Jarrett Carver           http://www.geocities.com/solarboyz1
solarboyz1 at hotmail.com   Unix/NT Systems Administrator
___________________________________________________________
"When people sigh 'Life is hard', I am always tempted to
ask 'compared to what?'".
               - Sydney Harris
____________________________________________________________




>From: Vikas Gandhi <VGandhi at quark.co.in>
>Reply-To: The SunHELP List <sunhelp at sunhelp.org>
>To: Predrag.Zecevic at 2e-systems.com
>CC: The SunHELP List <sunhelp at sunhelp.org>
>Subject: RE: [SunHELP] Locked Accounts
>Date: Thu, 8 Jan 2004 09:43:31 +0530
>
>"useradd temp7" Thats it.
>Predrag, actually we are doing this from a script which is supposed to
>install a number of applications.
>
>Regards
>Vikas
>
>
>-----Original Message-----
>From: Predrag Zecevic [mailto:Predrag.Zecevic at 2e-systems.com]
>Sent: Wednesday, January 07, 2004 2:50 PM
>To: The SunHELP List
>Subject: Re: [SunHELP] Locked Accounts
>
>
>Hi,
>
>send to us your useradd command
>;-)
>
>Vikas Gandhi wrote:
>
> >Hi All
> >  I face a peculiar problem. When I am creating new accounts using 
>command
> >prompts(useradd), I have *LK* in the shadow (given below)
> >temp5:*LK*:12424::::::
> >
> >Now when I do
> >bash-2.03# passwd temp5
> >New Password:
> >Permission denied
> >
> >How can I change my passwd thru passwd command.
> >FYI: I do not want to manually edit /etc/shadow under any circumstances.
> >
> >Regards
> >Vikas
> >_______________________________________________
> >SunHELP maillist  -  SunHELP at sunhelp.org
> >http://www.sunhelp.org/mailman/listinfo/sunhelp
> >
> >
> >
>
>--
>| Predrag Zecevic | e-Mail: Predrag.Zecevic at 2e-Systems.COM |
>| 2e Systems GmbH |              Tel: (+49)[0]6107 989 415 |
>|Im Taubengrund 12|              Fax: (+49)[0]6107 989 494 |
>|65451 Kelsterbach|                                        |
>|     Germany     |         Cellular: (+49)[0]174 3109 288 |
>+=================+
>... at least I thought I was dancing, 'til somebody stepped on my hand. --
>J. B. White
>_______________________________________________
>SunHELP maillist  -  SunHELP at sunhelp.org
>http://www.sunhelp.org/mailman/listinfo/sunhelp
>_______________________________________________
>SunHELP maillist  -  SunHELP at sunhelp.org
>http://www.sunhelp.org/mailman/listinfo/sunhelp

_________________________________________________________________
Take advantage of our limited-time introductory offer for dial-up Internet 
access. http://join.msn.com/?page=dept/dialup



More information about the SunHELP mailing list