Add 'add_user.sh'
This commit is contained in:
6
add_user.sh
Normal file
6
add_user.sh
Normal file
@ -0,0 +1,6 @@
|
||||
# add user to host unless it already exists
|
||||
# USERNAME="name of user to create"
|
||||
# USERID="user id of user to create"
|
||||
# -s /nonexistent # no interactive shell
|
||||
# -h - # makes it inaccessable via password-based login
|
||||
grep "$USERNAME:" /etc/passwd > /dev/null || pw adduser -n $USERNAME -u $USERID -s "" -h -
|
||||
Reference in New Issue
Block a user