Mise à jour de 'ecoleA/change_username.sh'

test du user ROOT
This commit is contained in:
Cédric Abonnel 2022-12-12 13:56:05 +01:00
parent 1c2cd7786c
commit 2137a9ce69
1 changed files with 7 additions and 0 deletions

View File

@ -1,4 +1,11 @@
#!/bin/bash #!/bin/bash
# Test du user ROOT
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
usermod -l aoste aosteadmin usermod -l aoste aosteadmin
usermod -d /home/aoste -m aoste usermod -d /home/aoste -m aoste
chfn -f aoste aoste chfn -f aoste aoste