Adding user accounts: Difference between revisions
From Powers Wiki
No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
= Linux = | = Linux = | ||
== Setting up basic credentials == | == Setting up basic credentials == | ||
* Log in to the cluster head node, either ''via'' SSH or at the machine. | * Log in '''as root''' to the cluster head node, either ''via'' SSH or at the machine. | ||
* Add the user account: | * Add the user account: | ||
useradd -g bionmr -m -s /bin/bash ''new_username'' | |||
* Add a password to the new account: | * Add a password to the new account: | ||
passwd ''new_username'' | |||
* Add a Samba password to the new account: | * 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: | * Add an Apache password to the new account: | ||
htpasswd /etc/apache2/htpasswd ''new_username'' | |||
* Allow the user to log in ''via'' secure shell: | * Allow the user to log in ''via'' secure shell: | ||
sed -e 's,^\(AllowUsers\),\1 ''new_username'',' -i /etc/ssh/sshd_config | |||
* Now create a secure shell asymmetric key pair for the user: | * Now create a secure shell asymmetric key pair for the user: | ||
su -l ''new_username'' | |||
ssh-keygen -t rsa -b 4096 | ssh-keygen -t rsa -b 4096 | ||
exit | exit | ||
Line 35: | Line 35: | ||
== Archiving the credentials == | == 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 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 = | = Windows = |
Revision as of 14:40, 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
- 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 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