more accurate user checking
This commit is contained in:
parent
00db32cd68
commit
2a40c74e59
|
@ -287,7 +287,7 @@ create_users() {
|
||||||
_owner=$(check_owner "$username" "$owner")
|
_owner=$(check_owner "$username" "$owner")
|
||||||
if test -n "$_owner"
|
if test -n "$_owner"
|
||||||
then
|
then
|
||||||
if ! grep -e "^$_owner" /etc/passwd > /dev/null
|
if ! grep -e "^${_owner}:" /etc/passwd > /dev/null
|
||||||
then
|
then
|
||||||
useradd -m -G "$VMDUSERS" "$_owner"
|
useradd -m -G "$VMDUSERS" "$_owner"
|
||||||
echo "$message" > "/home/${_owner}/.ssh/authorized_keys"
|
echo "$message" > "/home/${_owner}/.ssh/authorized_keys"
|
||||||
|
|
Loading…
Reference in New Issue