Add 'add_user.sh'

This commit is contained in:
2024-01-26 12:16:17 +01:00
parent 80ec291454
commit 52fefa9d36

6
add_user.sh Normal file
View 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 -