From 4b78e0fe5b93180a930a32c97a2483c40311a1e3 Mon Sep 17 00:00:00 2001 From: David Beniamine <david.beniamine@tetras-libre.fr> Date: Thu, 18 Jan 2018 13:54:11 +0100 Subject: [PATCH] Do everything as sudo --- deploy.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy.sh b/deploy.sh index e8750a0..59e62f6 100755 --- a/deploy.sh +++ b/deploy.sh @@ -4,6 +4,7 @@ if [ "$ans" != "y" ] then exit 1 fi +sudo apt-get update sudo apt-get -y -q install libpam-ldap libnss-ldap nscd smbclient winbind cifs-utils libpam-mount kdm kdm while [ -z "$SRV_NAME" ] do @@ -12,17 +13,17 @@ done # Prepare LDAP config for f in dist/* do - cp -r $f / + sudo cp -r $f / done for f in `find dist/ -type f` do - sed -i.orig "s/DSIT/$SRV_NAME/g" ${f/dist/} + sudo sed -i.orig "s/DSIT/$SRV_NAME/g" ${f/dist/} done # remove local users for user in 01-mini 02-super 03-maxi direction prof do - deluser --remove-home $user + sudo deluser --remove-home $user done echo "looking for admin ldap user" -getent passwd admin +sudo getent passwd admin -- GitLab