OSDN Git Service

add user modify
authorpaperbenni <paperbenni@gmail.com>
Sat, 30 May 2020 21:00:31 +0000 (23:00 +0200)
committerpaperbenni <paperbenni@gmail.com>
Sat, 30 May 2020 21:00:31 +0000 (23:00 +0200)
topinstall.sh
user/modify.sh [new file with mode: 0644]

index 4a17292..d8ed77d 100644 (file)
@@ -22,13 +22,12 @@ are you sure you want to run this?" | imenu -C || {
     }
 fi
 
-touch /tmp/removeimenu
+touch /tmp/climenu
 touch /opt/topinstall
 
 curl -s https://raw.githubusercontent.com/instantOS/imenu/master/imenu.sh >/usr/bin/imenu
 chmod 755 /usr/bin/imenu
 
-rm /tmp/removeimenu
 pacman -Sy --noconfirm
 
 pacman -S reflector --noconfirm --needed
@@ -54,3 +53,7 @@ pacman -S --noconfirm --needed base linux linux-headers linux-lts linux-lts-head
 # drivers todo
 ./network/network.sh
 ./bootloader/config.sh
+./user/modify.sh
+
+echo "finished installing instantOS"
+rm /tmp/climenu
diff --git a/user/modify.sh b/user/modify.sh
new file mode 100644 (file)
index 0000000..7817923
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+# modify existing users to work with instantOS
+
+echo "adding groups"
+groupadd video &>/dev/null
+groupadd wheel &>/dev/null
+groupadd docker &>/dev/null
+
+usermod -a -G examplegroup exampleusername
+REALUSERS="$(ls /home/ | grep -v '+')"
+for i in $REALUSERS; do
+    echo "processing user $i"
+    usermod -a -G wheel "$i"
+    usermod -a -G video "$i"
+    usermod -a -G docker "$i"
+done