about summary refs log tree commit diff stats
path: root/bin/makeuser
diff options
context:
space:
mode:
authoradmins <admins@tilde.institute>2022-07-12 19:22:47 -0400
committeradmins <admins@tilde.institute>2022-07-12 19:22:47 -0400
commit7d39c4e29b95f44a890d6aa63d76036f6b7a7e43 (patch)
treeabf7aeb7cb087a2aac2d1e872d541d9dc3ec93cb /bin/makeuser
parente475fb1957913cba5a648b8422a821a6d1fc2bf4 (diff)
downloadadmin-7d39c4e29b95f44a890d6aa63d76036f6b7a7e43.tar.gz
updated some files that had drifted locally
Diffstat (limited to 'bin/makeuser')
-rwxr-xr-xbin/makeuser11
1 files changed, 9 insertions, 2 deletions
diff --git a/bin/makeuser b/bin/makeuser
index 91e3b56..e9a4c1f 100755
--- a/bin/makeuser
+++ b/bin/makeuser
@@ -84,13 +84,20 @@ case $1 in
 # to the main site
     sort -u /etc/httpd-vusers.conf > /etc/httpd-vusers.conf.sorted
     cp /etc/httpd-vusers.conf.sorted /etc/httpd-vusers.conf
-    pkill -HUP httpd
+    #pkill -HUP httpd
+    rcctl restart httpd
 
 # send welcome email
         sed -e "s/newusername/$1/g" /admin/misc/email.tmpl | mail -r admins@tilde.institute -s "welcome to tilde.institute!" $2
 
 # subscribe to mailing list
-    echo " " | doas -u $1 mail -s "subscribe" institute-join@lists.tildeverse.org
+    #echo " " | doas -u $1 mail -s "subscribe" institute-join@lists.tildeverse.org
+
+# lock down the users' history files so they can't be deleted or truncated (bash and ksh only)
+    doas -u "$1" touch /home/$1/.history
+    doas -u "$1" touch /home/$1/.bash_history
+    chflags uappnd /home/$1/.history
+    chflags uappnd /home/$1/.bash_history
 
 # announce the new user's creation on mastodon
 # then copy their ssh key to their home directory