README.md / samba.sh add optional ID argument to user creation
This commit is contained in:
parent
11eb428a88
commit
1cdc93bd2d
@ -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
|
||||
|
6
samba.sh
6
samba.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user