users for this exersize.. ============================= kguo8 abarbcaldela zzhou5 chouck asmallco How do I delete uses from the HarveyV ---------------------------------------- Loggin in as root.. 01 - cd /admlocal/UTILS/DELETEUSERS/ [root@harveyv DELETEUSERS]# 02 - Using the text editor of your choice -- editor CCYY-Month-Day_dellist vi 2024012-10-delelist -- one userid per line 03 ./RunDeleteUsers.bash 2024012-10-dellist 04 sh ConfirmDelete.sh If a blank return then success. 05 mv 2024012-10-dellist SAVED NOTES: A dated file to track when a user was deleted. RunDeleteUsers.bash calls DeleteUsers.bash How do I add uses from the HarveyV ---------------------------------------- Loggin in as root.. 01 - cd /admlocal [root@harveyv admlocal]# 02 - Using the text editor of your choice -- editor newuserlist.txt vi newuserlist.txt -- one userid per line 03 - ./RunNewUserAdd.bash How do I add uses from the HarveyV USAGE: ./RunNewUserAdd.bash newuserlist.txt student ./RunNewUserAdd.bash newuserlist.txt facstaff ./RunNewUserAdd.bash newuserlist.txt student Tue Dec 10 08:30:57 EST 2024 ./RunNewUserAdd.bash: /admlocal/CheckNewUserList.bash newuserlist.txtdos2unix: converting file newuserlist.txt to Unix format ... 4913 curusers 5 newuserlist.txt 2 newuserlist-d.txt 3 newuserlist-u.txt 4923 total Tue Dec 10 08:30:58 EST 2024 ./RunNewUserAdd.bash: /admlocal/AddNewUsers.bash studentTue Dec 10 08:30:58 EST 2024 ./RunNewUserAdd.bash SetNewUsers.bash student >> LOG/2024-12-10-1733837457-student-SetNewUsers.run 2>&1student Check the LOGS in /admlocal/LOG for files 2024-12-10-1733837457-* --- -- --------------------------------------------------------------- /admlocal/mountnewusers.sh to mount the users windows share. --- -- --------------------------------------------------------------- /admlocal/chownnewusers.sh to check user(s) is/are valid. --- -- --------------------------------------------------------------- /admlocal/mountnewusers.sh; /admlocal/chownnewusers.sh; /admlocal/dfnewusers.sh ------------------------------------------------------------------------------- Tue Dec 10 08:30:58 EST 2024 [root@harveyv admlocal]# sh -x /admlocal/mountnewusers.sh + mount /u0/users/abarbcaldela + mount /u0/users/kguo8 + mount /u0/users/zzhou5 [root@harveyv admlocal]# sh -x /admlocal/chownnewusers.sh + cd /u0/users + chown abarbcaldela:domain-users abarbcaldela + ls -ld abarbcaldela drwx--x--x 2 abarbcaldela domain-users 0 Aug 18 2023 abarbcaldela + cd /u0/users + chown kguo8:domain-users kguo8 + ls -ld kguo8 drwx--x--x 2 kguo8 domain-users 0 Feb 3 2023 kguo8 + cd /u0/users + chown zzhou5:domain-users zzhou5 + ls -ld zzhou5 drwx--x--x 2 zzhou5 domain-users 0 Aug 19 2023 zzhou5 NOTES Now going up to what was returned, make note 5 newuserlist.txt 2 newuserlist-d.txt 3 newuserlist-u.txt The 2 users that already existed .. chouck asmallco were not added. RunNewUserAdd.bash calls 4 other bash scripts you might want to look at /usr/local/bin/ColourBash.bash /admlocal/CheckNewUserList.bash /admlocal/AddNewUsers.bash /admlocal/SetNewUsers.bash I just need to add am /etc/fstab entry how do I do that? --------------------------------------------------------- Loggin in as root.. 01 - cd /admlocal [root@harveyv admlocal]# These need to be made one at a time and then inserted at the bottom ofthe /etc/fstab file ./MkFSTAB-entry.bash USAGE: ./MkFSTAB-entry.bash ./MkFSTAB-entry.bash facstaff chouck //ushares.bu.binghamton.edu/IndividualShares$/chouck /u0/users/chouck cifs rw,uid=chouck,gid=100000,file_mode=0755,dir_mode=0711,_netdev,nofail,mfsymlinks,domain=BU,credentials=/.credentials/credentials 0 0 If the entry above is correct do a second run wiht a redirect. MAKE SURE TO USE TWO > or YOU ./MkFSTAB-entry.bash facstaff chouck >> /etc/fstab