Linux: now uses useradd instead of adduser (not working on opensuse).

This commit is contained in:
Jeremy Gardais 2016-06-22 10:56:38 +02:00
parent 52633d7fe9
commit 48563e81a7
1 changed files with 1 additions and 1 deletions

View File

@ -185,7 +185,7 @@ function AddUserBackuppc() {
dscl . -create "/Users/$userLogin" IsHidden 1 # hide from login window dscl . -create "/Users/$userLogin" IsHidden 1 # hide from login window
#dscl . -passwd "/Users/$userLogin" password #dscl . -passwd "/Users/$userLogin" password
;; ;;
'Linux') adduser --system --disabled-password --shell /bin/sh --home "$homeDir/" --gid "$groupId" "$userLogin" ;; 'Linux') useradd --system --shell /bin/sh --home-dir "$homeDir/" --create-home --gid "$groupId" "$userLogin" ;;
esac esac
chown -R "$userLogin:$groupId" "$homeDir" chown -R "$userLogin:$groupId" "$homeDir"
allowUserToConnectToThisMachineUsingSsh "${userLogin}" allowUserToConnectToThisMachineUsingSsh "${userLogin}"