From 2137a9ce69c563895e62f0f8c9cc9d4bfcd5553a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Abonnel?= Date: Mon, 12 Dec 2022 13:56:05 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20'ecoleA/change=5Fus?= =?UTF-8?q?ername.sh'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test du user ROOT --- ecoleA/change_username.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ecoleA/change_username.sh b/ecoleA/change_username.sh index 66a100a..bd48c18 100644 --- a/ecoleA/change_username.sh +++ b/ecoleA/change_username.sh @@ -1,4 +1,11 @@ #!/bin/bash + +# Test du user ROOT +if [ "$EUID" -ne 0 ] + then echo "Please run as root" + exit +fi + usermod -l aoste aosteadmin usermod -d /home/aoste -m aoste chfn -f aoste aoste