Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 28 Details for
Bug 54
Adduser script
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
adduser
adduser (text/plain), 1.89 KB, created by
Mikael Hallendal (hallski) (RETIRED)
on 2002-01-06 15:05:08 UTC
(
hide
)
Description:
adduser
Filename:
MIME Type:
Creator:
Mikael Hallendal (hallski) (RETIRED)
Created:
2002-01-06 15:05:08 UTC
Size:
1.89 KB
patch
obsolete
> >#!/bin/sh ># adduser script for use with shadow passwords and useradd command. ># by Hrvoje Dogan <hdogan@student.math.hr>, Dec 1995. ># Modified by Patrick Volkerding, Oct 1997. >echo >echo -n "Login name for new user (8 characters or less) []: " >read LOGIN >if [ -z "$LOGIN" ] >then echo "Come on, man, you can't leave the login field empty...";exit >fi >echo >echo -n "User id for $LOGIN [ defaults to next available]: " >read ID >GUID="-u $ID" >if [ -z "$ID" ] >then GUID="" >fi >echo >echo -n "Initial group for $LOGIN [users]: " >read GID >if [ -z "$GID" ]; then > GID="users" >fi >GGID="-g $GID" ># >echo >echo -n "$LOGIN's home directory [/home/$LOGIN]: " >read HME >if [ -z "$HME" ]; then > HME="/home/$LOGIN" >fi >GHME="-d $HME" >echo >echo -n "$LOGIN's shell [/bin/bash]: " >read SHL >GSHL="-s $SHL" >if [ -z "$SHL" ] >then GSHL="-s /bin/bash" > SHL="/bin/bash" >fi >echo >echo -n "$LOGIN's account expiry date (MM/DD/YY) []: " >read EXP >GEXP="-e $EXP" >if [ -z "$EXP" ] >then GEXP="" >fi >echo >echo "OK, I'm about to make a new account. Here's what you entered so far:" >echo >echo New login name: $LOGIN >if [ -z "$GUID" ] >then echo New UID: [Next available] >else echo New UID: $UID >fi >if [ -z "$GGID" ] >then echo Initial group: users >else echo Initial group: $GID >fi >if [ -z "$GAGID" ] >then echo Additional groups: [none] >else echo Additional groups: $AGID >fi >if [ -z "$GHME" ] >then echo Home directory: /home/$LOGIN >else echo Home directory: $HME >fi >if [ -z "$GSHL" ] >then echo Shell: /bin/bash >else echo Shell: $SHL >fi >if [ -z "$GEXP" ] >then echo Expiry date: [no expiration] >else echo Expiry date: $EXP >fi >echo >echo "This is it... if you want to bail out, hit Control-C. Otherwise, press" >echo "ENTER to go ahead and make the account." >read FOO >echo >echo Making new account... >/usr/sbin/useradd $GHME -m $GEXP $GGID $GAGID $GSHL $GUID $LOGIN >if [ -d $HME ]; then > chmod 711 $HME >fi >#echo >#/usr/bin/chfn $LOGIN >echo >/usr/bin/passwd $LOGIN >echo "Done..."
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 54
: 28