# Week 3 # By John Stile #################################################### # 1. Tonight we added users with 3 methods: # manually, # useradd, # admintool # 2. Tonight we also installed software with gzip, tar, and pkgadd # gzip, # gcc, # top, # perl, # bash, # traceroute, # netscape #################################################### ################################################ # manual edit of files to creat a user ################################################ # Edit the passwd file cp /etc/passwd /etc/passwd.20010323.1 vi /etc/passwd greg:x:60003:10:Greg Simonoff:/home/greg:/usr/bin/ksh # Edit the shadow file cp /etc/shadow /etc/shadow.20010323.1 vi /etc/shadow greg::6445:::::: # Make their Home directory mkdir /home/ # Set their loging password passwd # Give them the default dot files cp /etc/skel/local.login /home//.login cp /etc/skel/local.cshrc /home//.cshrc cp /etc/skel/local.profile /home//.profile ################################################### # Like true geeks, my partner and I wrote a script # to save us from typing over and over # ### cp /etc/skel/* /home/greg/ ### cd /home/greg/ ### files=`ls` ### for file in $files ### do ### mv $file `echo $file |sed 's/local//'` ### done ######### # make the user of their home directory chown -R greg:10 /home/greg chmod 700 /home/greg ################################################ # useradd ( a much simpler method) ################################################ useradd -u -g -d /home/ -c "Users Name" -s /bin/sh -m passwd ################################################ # AdminTool (an even simpler method) ################################################ admintool |--> Edit -->Add-->User:shmo ,Shell is C, home is /home/shmo ######################################################### # Install Software ######################################################### #1. go to gregs server, and get software ftp 10.4.1.230 ftp> anonymous Passwd: bla@bla.bla ftp> cd pub ftp> prompt off #2. get gzip, gcc, top, perl, bash, traceroute, netscape.tar.gz ftp> mget * #3. Install gzip with pkgadd pkgadd -d gzip* (choose 'a' for all) #4. Get gzip in your path PATH=$PATH:/usr/local/bin #5. Ungzip the files in the /usr/local/src. gzip -d `ls |grep gz |grep -v "^gz"` #6. Install all packeages in /usr/local/src with pkgadd files=`ls |grep local|grep -v "^gz"` for file in $files do pkgadd -d ./$file done type a for pakga ########################################################## #4. netscape # ungzip, untar, do ezinstall. ####################################################### # Setup an anonymous ftp site. ->> see the next day. # man in.ftpd > out # vi out # :g/ #remove ctrl-M's # :g/ #remove ctrl-H's