Adding user accounts: Difference between revisions

From Powers Wiki
No edit summary
No edit summary
Line 80: Line 80:
== Setting up the PuTTY key ==
== Setting up the PuTTY key ==
FIXME
FIXME
[[Category:Sysadmin]]

Revision as of 14:55, 5 August 2015

When new group members join, they'll need access to our file and program server on both Windows and Linux, and a few odds and ends. Here's how to get that done the right way.

FIRST: Have the user decide on a username and password that they will re-enter continuously during this process. They will be denoted as new_username and new_password throughout this set of instructions.

Linux

Setting up basic credentials

  • Log in as root to the cluster head node, either via SSH or at the machine.
  • Add the user account:
useradd -g bionmr -m -s /bin/bash new_username
  • Add a password to the new account:
passwd new_username
  • Add a Samba password to the new account:
smbpasswd -c /etc/samba/smb.conf -a new_username
  • Add an Apache password to the new account:
htpasswd /etc/apache2/htpasswd new_username
  • Allow the user to log in via secure shell:
sed -e 's,^\(AllowUsers\),\1 new_username,' -i /etc/ssh/sshd_config
  • Add a couple lines to the bash config:
echo 'source /opt/bashrc' >> new_username/.bashrc
echo 'source /opt/bashrc' >> new_username/.bash_profile
  • Now create a secure shell asymmetric key pair for the user:
su -l new_username
ssh-keygen -t rsa -b 4096
exit

(Use the default file in which to save the key)

Archiving the credentials

  • Log in as root to the cluster head node, either via SSH or at the machine.
  • Physically plug the sysadmin flash drive into the cluster head node.
  • Mount the sysadmin flash drive:
mount /dev/sdc1 /mnt/flash
  • Navigate into the flash drive:
cd /mnt/flash/admin-tools/linux/workstations
  • Add the user into the sub-scripts:
echo new_username >> bashrc/users.lst
echo new_username >> passwd/users.lst
  • Copy the passwd/shadow information:
grep ^new_username /etc/passwd >> passwd/etc_passwd
grep ^new_username /etc/shadow >> passwd/etc_shadow
  • Copy the secure shell key pair:
mkdir ssh-rsa/clients/new_username_bionmr
cp /home/new_username/.ssh/id_rsa* ssh-rsa/clients/new_username_bionmr/
  • Unmount the sysadmin flash drive:
umount /mnt/flash

Windows

Creating the account

  • Log in to the user's workstation on an existing account, and use the Control Panel to create a new Administrator account.
  • Add a password to the newly created account. Make sure the user can remember their password.
  • Log out and back into the new account.

Setting up the network drive

FIXME

Setting up the PuTTY key

FIXME