]> rtime.felk.cvut.cz Git - novaboot.git/blobdiff - server/adduser-novaboot
tests: Get rid of asynchronous process substitution
[novaboot.git] / server / adduser-novaboot
index a8bf700acedca84ae90d1179dc825505505a6cb7..928e76358cb4bc01dbee7449da8ef380c469e602 100755 (executable)
@@ -49,7 +49,7 @@ fi
 [ -z "$key" -o "$(echo "$key" | wc -l)" -ne 1 ] && die "--key needs to be just one line"
 echo "$key" | grep -q ssh || die "--key does not look like an SSH public key"
 
-adduser --disabled-password --shell $(which novaboot-shell) $adduser_opts "$@"
+adduser --disabled-password --ingroup novaboot --shell $(which novaboot-shell) $adduser_opts "$@"
 
 user="$1"
 home=$(getent passwd "$user"|awk -F: '{print $6;}')
@@ -77,6 +77,7 @@ if [ -d /run/systemd/system ]; then
 Requires=novaboot-server-session@$user.service
 After=novaboot-server-session@$user.service
 EOF
+    systemctl daemon-reload
 fi
 
 echo "Creating configuration template in $home/.novaboot-shell"
@@ -102,6 +103,7 @@ cat <<'CONFIG_EOF' > $home/.novaboot-shell
 # --uboot-addr=ramdisk=0x83100000
 # "
 CONFIG_EOF
+chown $user: $home/.novaboot-shell
 
 echo "Done"
 exit 0
@@ -141,7 +143,8 @@ F<~/.ssh/authorized_keys> and marked with administrator flag.
 =item --admin-id NAME
 
 User name associated with the key. This user name is shown to
-connecting users when the target is occupied.
+connecting users when the target is occupied by the administrator.
+When omitted, I<admin> is used as the user name.
 
 =back