Important considerations:
You will need a username, uid and the full name. check spelling and get uid from seis.bris.ac.uk using the finger and id commands. We tend to assume /bin/bash as the default shell. 'source' the script and it will produce an useradd line eg
usr/sbin/useradd -g users -d /home/hwakeford -s /bin/bash -m -k /etc/skel/ -c 'Hannah Wakeford' hwakefordRun this line on the home disk server (currently sgra.star) and on aquila.star. The master copy of the accounts are stored in /etc/passwd and to some extent /etc/shadow on aquila. UoB usernames and passwords can be authenticated against active directory, non-UoB names won't resolve.
For non UoB names (sometimes this is necessary for UoB ones if authentication problems occur) create a password using mkpasswd from the expect package, eg
[root@mme-desktop ~]# mkpasswd -l 10 b3unT?uu8SSend passwd to user with instructions to change it immediately. Eg
Hi new user, OK, your temporary password for the hwakeford account is below. Please log in to aquila.star.bris.ac.uk and change it immediately using the passwd command. b3unT?uu8S Please let me know when you've done this, as I can then copy your password to other systems you may want to use. Regards, RhysTo copy the user accounts to new computer, or to update an existing one, run the script below on the new computer.
/usr/local/sbin/passwd_update
useradd: user 'vq21447' already existsthen check if user is already in /etc/passwd, if not the system is getting the username from the UoB directory. So in order to create a local account, you need to edit /etc/nsswitch on the machine producing the error. Change the line
passwd files sssor similar to
passwd filestemporarily to allow the useradd command to work. Then change it back again.