samba.sh fix import option thanks @hugochinchilla
This commit is contained in:
parent
ab15aae77d
commit
682b2d769c
8
samba.sh
8
samba.sh
@ -22,10 +22,10 @@ set -o nounset # Treat unset variables as an error
|
|||||||
# Arguments:
|
# Arguments:
|
||||||
# file) file to import
|
# file) file to import
|
||||||
# Return: user(s) added to container
|
# Return: user(s) added to container
|
||||||
import() { local name file="${2}"
|
import() { local name id file="${1}"
|
||||||
for name in $(cat $file | cut -d: -f1); do
|
while read name id; do
|
||||||
useradd "$name" -M
|
useradd "$name" -M -u "$id"
|
||||||
done
|
done < <(cut -d: -f1,2 --output-delimiter=' ' $file)
|
||||||
pdbedit -i smbpasswd:$file
|
pdbedit -i smbpasswd:$file
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user