help writing a script
Deven Phillips
cytronix at lava.net
Tue Jan 8 12:44:23 PST 2002
Here you go!!!
#!/bin/bash
while [ : ] ; do
echo -n "Enter the First Name (or Press <CTRL>+<C> to quit): " ;
read forename ;
echo -n "Enter the Last Name: " ;
read surname ;
echo -n "Enter the user's login ID: " ;
read newuserid ;
echo -n "Enter a password: " ;
read newpassword ;
useradd -p "$newpassword" "$newuserid" ;
chfn -f "$forename $surname" "$newuserid" ;
done
Must be run as root. :)
Deven Phillips, CISSP
On Monday 07 January 2002 10:19 pm, you wrote:
> Hi all, I need your guy's help writing a script to add a list of users and
> creating home directories for them, I'm not much of a shell scripting guru
> so I'll appreciate any help or pointers given..
> I need this script to create login names & home directories, but I want to
> include full name and I need it to prompt for a password using the useradd
> command.
> Can anyone help me here??
> or at least tell me where I can get some reference?
>
> TIA
>
> Julio
>
> ---
> You are currently subscribed to luau as: d-spair at hawaii.rr.com
> To unsubscribe send a blank email to $subst('Email.Unsub')
More information about the LUAU
mailing list