From 7083d0e305d529225a00e7f378a9269019ff00b6 Mon Sep 17 00:00:00 2001 From: Thomas Walker Lynch Date: Sat, 5 Mar 2022 19:11:27 -0500 Subject: [PATCH] expanding abreviations --- {doc => document}/dir-structure.txt | 0 {doc => document}/file_extentions.txt | 0 {doc => document}/makefile-issue | 0 {doc => document}/note.txt | 0 {doc => document}/real_uid.txt | 0 {doc => document}/real_uid_bug.pdf | Bin {doc => document}/src.txt | 0 {doc => document}/subu-mk-0.txt | 0 {doc => document}/subu.txt | 0 {doc => document}/subu_as_group.txt | 0 {doc => document}/todo.txt | 0 {doc => document}/try.txt | 0 executable/ch_subu | 21 +++++++++++++++++++++ {exec => executable}/subu_add | 0 {exec => executable}/subu_del | 2 +- executable/test | 6 ++++++ 16 files changed, 28 insertions(+), 1 deletion(-) rename {doc => document}/dir-structure.txt (100%) rename {doc => document}/file_extentions.txt (100%) rename {doc => document}/makefile-issue (100%) rename {doc => document}/note.txt (100%) rename {doc => document}/real_uid.txt (100%) rename {doc => document}/real_uid_bug.pdf (100%) rename {doc => document}/src.txt (100%) rename {doc => document}/subu-mk-0.txt (100%) rename {doc => document}/subu.txt (100%) rename {doc => document}/subu_as_group.txt (100%) rename {doc => document}/todo.txt (100%) rename {doc => document}/try.txt (100%) create mode 100644 executable/ch_subu rename {exec => executable}/subu_add (100%) rename {exec => executable}/subu_del (97%) create mode 100644 executable/test diff --git a/doc/dir-structure.txt b/document/dir-structure.txt similarity index 100% rename from doc/dir-structure.txt rename to document/dir-structure.txt diff --git a/doc/file_extentions.txt b/document/file_extentions.txt similarity index 100% rename from doc/file_extentions.txt rename to document/file_extentions.txt diff --git a/doc/makefile-issue b/document/makefile-issue similarity index 100% rename from doc/makefile-issue rename to document/makefile-issue diff --git a/doc/note.txt b/document/note.txt similarity index 100% rename from doc/note.txt rename to document/note.txt diff --git a/doc/real_uid.txt b/document/real_uid.txt similarity index 100% rename from doc/real_uid.txt rename to document/real_uid.txt diff --git a/doc/real_uid_bug.pdf b/document/real_uid_bug.pdf similarity index 100% rename from doc/real_uid_bug.pdf rename to document/real_uid_bug.pdf diff --git a/doc/src.txt b/document/src.txt similarity index 100% rename from doc/src.txt rename to document/src.txt diff --git a/doc/subu-mk-0.txt b/document/subu-mk-0.txt similarity index 100% rename from doc/subu-mk-0.txt rename to document/subu-mk-0.txt diff --git a/doc/subu.txt b/document/subu.txt similarity index 100% rename from doc/subu.txt rename to document/subu.txt diff --git a/doc/subu_as_group.txt b/document/subu_as_group.txt similarity index 100% rename from doc/subu_as_group.txt rename to document/subu_as_group.txt diff --git a/doc/todo.txt b/document/todo.txt similarity index 100% rename from doc/todo.txt rename to document/todo.txt diff --git a/doc/try.txt b/document/try.txt similarity index 100% rename from doc/try.txt rename to document/try.txt diff --git a/executable/ch_subu b/executable/ch_subu new file mode 100644 index 0000000..c7298fa --- /dev/null +++ b/executable/ch_subu @@ -0,0 +1,21 @@ +#!/bin/bash +# +# This must be sourced + +subu=$1 +if [ -z "$subu" ]; then + echo "no subuser name supplied" + exit 1 +fi + +machine="$(hostname)" +xkey=$(xauth list | grep Turbine | awk '{print $3}') + +if [ -z "$key" ]; then + echo "xauth key not found" + exit 1 +fi + +sudo su "$subu" + +xauth \ No newline at end of file diff --git a/exec/subu_add b/executable/subu_add similarity index 100% rename from exec/subu_add rename to executable/subu_add diff --git a/exec/subu_del b/executable/subu_del similarity index 97% rename from exec/subu_del rename to executable/subu_del index 2a9e474..98fc7c4 100755 --- a/exec/subu_del +++ b/executable/subu_del @@ -52,7 +52,7 @@ if [ -e "$mail_target_file" ]; then exit 1 fi -sudo killall --signal 5 --user "$user_subu" +sudo killall --signal 5 --wait --user "$user_subu" sudo mv "$mail_source_file" "$mail_target_file" sudo chmod -R go-rwx "$home_subu" sudo chown -R "$user_admin":"$user_admin" "$home_subu" diff --git a/executable/test b/executable/test new file mode 100644 index 0000000..88eea60 --- /dev/null +++ b/executable/test @@ -0,0 +1,6 @@ + +subu=$1 + +whoami +sudo su $subu +whoami \ No newline at end of file -- 2.20.1