samba.sh derp2
This commit is contained in:
parent
2675311ab8
commit
6d8895966c
2
samba.sh
2
samba.sh
@ -51,7 +51,7 @@ global() { local key="${1%%=*}" value="${1#*=}" file=/etc/samba/smb.conf
|
||||
# Return: user(s) added to container
|
||||
import() { local name id file="$1"
|
||||
while read name id; do
|
||||
grep -q "^$user:" /etc/passwd || adduser -D -H -u "$id" "$name"
|
||||
grep -q "^$name:" /etc/passwd || adduser -D -H -u "$id" "$name"
|
||||
done < <(cut -d: -f1,2 $file | sed 's/:/ /')
|
||||
pdbedit -i smbpasswd:$file
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user