README.md / samba.sh add optional ID argument to user creation

This commit is contained in:
David Personette 2016-08-30 06:01:21 -04:00
parent 11eb428a88
commit 1cdc93bd2d
2 changed files with 5 additions and 2 deletions

View File

@ -50,6 +50,7 @@ OR set local storage:
required arg: "<username>;<passwd>"
<username> for user
<password> for user
[ID] for user
-w "<workgroup>" Configure the workgroup (domain) samba should use
required arg: "<workgroup>"
<workgroup> for samba

View File

@ -88,9 +88,10 @@ timezone() { local timezone="${1:-EST5EDT}"
# Arguments:
# name) for user
# password) for user
# id) for user
# Return: user added to container
user() { local name="${1}" passwd="${2}"
useradd "$name" -M
user() { local name="${1}" passwd="${2}" id="${3:-""}"
useradd "$name" -M ${id:+-u $id}
echo "$passwd" | tee - | smbpasswd -s -a "$name"
}
@ -130,6 +131,7 @@ Options (fields in '[]' are optional, '<>' are required):
required arg: \"<username>;<passwd>\"
<username> for user
<password> for user
[ID] for user
-w \"<workgroup>\" Configure the workgroup (domain) samba should use
required arg: \"<workgroup>\"
<workgroup> for samba