parent
b99c861370
commit
350460eb61
|
|
@ -1,7 +1,12 @@
|
|||
#!/bin/bash
|
||||
getent group wheel || groupadd wheel
|
||||
useradd cg_maintain_user
|
||||
groupmems -g wheel -a cg_maintain_user
|
||||
if command -v groupmems &> /dev/null
|
||||
then
|
||||
groupmems -g wheel -a cg_maintain_user
|
||||
else
|
||||
usermod -a -G wheel cg_maintain_user
|
||||
fi
|
||||
echo '%wheel ALL=(ALL:ALL) ALL' | EDITOR='tee -a' visudo
|
||||
mkdir -p /home/cg_maintain_user/.ssh
|
||||
touch /home/cg_maintain_user/.ssh/authorized_keys
|
||||
|
|
|
|||
Loading…
Reference in New Issue