automatic user
parent
6c5b267211
commit
d6abf2d2bc
20
zerotier.sh
20
zerotier.sh
|
@ -1,22 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "do you use su command?(y/n)"
|
||||
read sucommand
|
||||
if [ $sucommand = y ]
|
||||
then
|
||||
echo "I need your username to add to the sudo group"
|
||||
echo "I need your username to add to the sudo group, if you are agree put your password"
|
||||
echo
|
||||
echo "IMPORTANT: please put the real username, not Real Name, example: manuel yes, Manuel no"
|
||||
echo
|
||||
echo "tell me your username:"
|
||||
read username
|
||||
echo "again:"
|
||||
read usernameagain
|
||||
|
||||
if [ $username = $usernameagain ]
|
||||
then
|
||||
echo GOOD
|
||||
su -c "sudo adduser $username sudo"
|
||||
su -c "sudo adduser $USER sudo"
|
||||
echo added to the sudo group
|
||||
echo
|
||||
echo
|
||||
|
@ -25,11 +14,6 @@ then
|
|||
echo
|
||||
read nothing
|
||||
exit
|
||||
else
|
||||
echo ERROR: not equal
|
||||
exit
|
||||
fi
|
||||
|
||||
else
|
||||
if [ $sucommand = n ]
|
||||
then
|
||||
|
|
Loading…
Reference in New Issue