#! /bin/sh if [ ! -d /home2 ] then mkdir /home2 fi useradd -D -b /home2 # Add an account for me locally: useradd -c "Nick Urbanik (local)" -p '$1$P63QEab9$aNQPVWaz8aj/Md7nX1V8w0' nickl # Remove a2 from sudoers and add me there instead: perl -pi -e 's/a2(\s+ALL=\(ALL\) ALL)$/nickl$1/' /etc/sudoers # create a group zebra, and add me and a2 to that group, # so that members can read the zebra configuration: groupadd zebra chgrp zebra /etc/zebra gpasswd -a nickl zebra gpasswd -a a2 zebra # chmod g+rx /etc/zebra # Add sysadmin directories to nickl's PATH: echo 'PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin' >> ~nickl/.bash_profile # Turn LDAP authentication back on: authconfig --kickstart --enableldap --enableldapauth --enableldaptls --ldapserver ldap.tyict.vtc.edu.hk --ldapbasedn 'dc=tyict,dc=vtc,dc=edu,dc=hk' # Add my network account to the zebra group: gpasswd -a nicku zebra