2 # adduser script for use with shadow passwords and useradd command.
3 # by Hrvoje Dogan <hdogan@student.math.hr>, Dec 1995.
5 echo -n "Login name for new user []:"
8 then echo "Come on, man, you can't leave the login field empty...";exit
11 echo -n "User id for $LOGIN [ defaults to next available]:"
19 echo -n "Initial group for $LOGIN [users]:"
27 echo -n "Additional groups for $LOGIN []:"
35 echo -n "$LOGIN's home directory [/home/$LOGIN]:"
43 echo -n "$LOGIN's shell [/bin/bash]:"
51 echo -n "$LOGIN's account expiry date (MM/DD/YY) []:"
58 echo OK, I'm about to make a new account. Here's what you entered so far:
59 echo New login name: $LOGIN
61 then echo New UID: [Next available]
62 else echo New UID: $UID
65 then echo Initial group: users
66 else echo Initial group: $GID
69 then echo Additional groups: [none]
70 else echo Additional groups: $AGID
73 then echo Home directory: /home/$LOGIN
74 else echo Home directory: $HME
77 then echo Shell: /bin/bash
81 then echo Expiry date: [no expiration]
82 else echo Expiry date: $EXP
84 echo "This is it... if you want to bail out, you'd better do it now."
86 echo Making new account...
87 /usr/sbin/useradd $GHME -m $GEXP $GGID $GAGID $GSHL $GUID $LOGIN
89 /usr/bin/passwd $LOGIN