Check if we found a free uid.
This commit is contained in:
parent
3369e8fda5
commit
da980ed894
1 changed files with 1 additions and 0 deletions
|
@ -74,6 +74,7 @@ next_passwd_uid() {
|
||||||
|
|
||||||
PASSWD_UID=$(next_passwd_uid)
|
PASSWD_UID=$(next_passwd_uid)
|
||||||
log "Add $1 ($2) to master.passwd with UID $PASSWD_UID"
|
log "Add $1 ($2) to master.passwd with UID $PASSWD_UID"
|
||||||
|
[ -z $PASSWD_UID ] && abort "No free UID found"
|
||||||
co -u master.passwd
|
co -u master.passwd
|
||||||
echo "$1:*:$PASSWD_UID:30::0:0:$2:/afs/stacken.kth.se/home/$1:/bin/bash" \
|
echo "$1:*:$PASSWD_UID:30::0:0:$2:/afs/stacken.kth.se/home/$1:/bin/bash" \
|
||||||
>> master.passwd
|
>> master.passwd
|
||||||
|
|
Loading…
Add table
Reference in a new issue