# Onboard New User to Yao Group
This note serves the following purpose:
- As the protocol for the group computer manager to add a new user to the group workstation and to the group storage cluster.
:::info
Before you get started, make sure that the new user has already received an account and a password from Stanford that way they can be added to the group storage cluster.
And if you are outside Stanford, make sure you are using the [Cisco VPN](https://uit.stanford.edu/service/vpn).<!--(https://workcontinuity.princeton.edu/remoteaccess).-->
:::
:::info
Note, the inequality symbols `<insert something meaningful>` are meant to indicate that you insert the answer to the question/phrase in the expression. The inequality symbols should not be entered in as part of the bash command itself.
:::
## Niall's task: Add a New User to the Workstation
To add a new user, first change directories until you have reached `/home`.
Next, type `sudo adduser <insert new user's username>`, and enter in your personal workstation password. If you do not have access to use sudo, get the group member with access to sudo to grant you access. Then, give them an initial temporary password such as not_a_nunatak or something you like. Finally, you should enter in their full name when asked to do so, and don't need to worry about the other fields pertaining to cell phone, office address, etc (just click enter to move through these categories).
<!--You may want to give them a folder, in which case you can enter `mkdir <First Name Last Name>` or call their folder whatever they want so long as it is clear to everyone who the folder belongs to.-->
If you want to delete a user, you can use the command `sudo rm -rf <user>`. This is likely not the best way of getting rid of everything, but it is one way to do so. Note, only use `rm -rf` when you are 100% confident in what you are doing. This means something like remove with recursive forcing, so everything will be gone. A gentler way of doing so may be to use `sudo deluser <user>`, and trying `rmdir <user dir>` to remove their directory.
Give someone sudo priviledges: `sudo adduser <username> sudo`.
The group computing onboarding email, while hosted on Oak in Niall's Group Computing Folder, is less convenient to access than a google doc. As such, the group computing onboarding email is now hosted [here](https://docs.google.com/document/d/156A2EESl7FqSdaJ_fgI-ulLWl0EtJsOK5dvtJbM6iJA/edit?usp=sharing).
Note: find the recursive difference between folders with the code `diff -r /folder1 /otherpath/folder1`. Useful for checking differences between, for example, group home and oak.
## Yao's tasks
### Step 1: Add a New User to Lai Research Group Github, Slack and Outlook group calendar
> I've added you to our group Outlook calendar. Can you also check your access to our [Group Google Drive](https://drive.google.com/drive/folders/18A6bVTw_oZCYK-BD0vRb7X8SGPUwKgCv?usp=sharing) and [Group meeting schedule](https://docs.google.com/spreadsheets/d/1Ybf5-LpRbBEaXN_BTOJS6JagpYeoRJV93xLBkAaUdDU/edit?usp=sharing)?
>
> Can you give me your SUNet ID so that I can add you to Sherlock?
>
> I'd also like to add you to our group Github. What is the email associated with your github account? If you don't have an account already, let me know the account email after you create one.
>
### Step 2: Add a new User to Sherlock and Oak
Send the following email to srcc-support@stanford.edu
>
>
> Title: request account to Sherlock
>
> Hi,
>
> I'd like to request accounts to Sherlock for the following group member(s):
>
> xxxx; SUNet ID:
>
> Thank you,
After the account is created, Yao will add user access to the group Oak directory via this link: https://workgroup.stanford.edu/ords/regapps/r/wgadmin/inbound?clear=702&p702_wg_id=oak:cyaolai
Please note that changes made in Workgroup Manager may take a few hours to propagate to Oak and Sherlock.
<!--### Step 2: Add a New User to the Group Storage Cluster
Send the following email to cses@princeton.edu
Title: request access to Della and /projects/LAI
Hi,
I'd like to request access to Della for my group member(s) xxxx <xxxxx@princeton.edu>?
Could we also give him access to the /projects/LAI directory?
Thank you,-->
<!---The following is not necessary, but I will leave it for now in case it actually plays a role.
### Step 2? Do the following
The creator of this document owns a Windows computer, so this tutorial will go through with how to perform this task given that operating system. First, click on Properties as highlighted below.

Next, navigate to security. Click on Unix Group\lai, and click Edit. Then the screen second from left will pop up. Click again on Unix Group\lai, and click on Add. Afterwards the screen in the bottom left will pop up, where you can click on Advanced. This may cause the Network Credentials pop up displayed in the right hand side. Be sure to enter your NetID@pu.win.princeton.edu as exemplefied, and then type your Princeton password.

The resulting window below will pop up as a result of clicking advance, where you can type the first name of the new group member. Make sure to discern between the potential options; one way to double check that you are adding the correct member is to type their name into the destination of your Princeton email address, and their address and NetID will pop up.

Finally, press ok through the tabs and you are all set!
--->
### Step 3: Check with the New User that they have access to Oak/Github
Ask the New User to create a folder with his/her own name in Oak.
> Hello! You should have received an email with link to join our Group Github. Can you check if you now have access to the pivate repositories in our [group Github](https://github.com/YaoGroup)?
>
> Your Sherlock account has been created, you should have received a confirmation email.
> Can you check if you have access to Sherlock? Open a terminal and enter the following into terminal:
>
> `ssh sunet_ID@login.sherlock.stanford.edu`
>
> Once logged into Sherlock, can you also check if you have access to our group storage space Oak? Enter:
>
> `cd /oak/stanford/groups/cyaolai`
>
> All group members have folders under their names, where they store their reserach files. To see the folders, enter
>
> `ls`
>
> Can you create a folder of your name and let me know once it is done? We summarized the basics of command lines for creating new directory..etc here
> https://hackmd.io/dd8wi827SpCLAe8p2Ype6w?view#A-The-Basics
## Josh's Tasks
### Step 1: Email Vinny Toth to request access for new members of the lab to the lab spaces:
> Subject: request access to Mitchell A20 and A62
>
> Hi Vinny,
>
> I'm a part of Yao Lai's group (cc'd) and I'm wondering if you would be able to grant card access to Yao's laboratory spaces (A20, A62) to <new student name> (cc'd).
>
> Thank you kindly,
> Josh
### Step 2: Check with the New User that they have access to A20 and A62
## Potentially Useful Commands
If you want to change the group of a document, perhaps if important and to make sure only the correct members can edit the file, one can use `chgrp <new group> <object.txt>`. You can view the read, write, and annotate abilities (rwx) of a file with the bash command `ls -la <object.txt>`. You can see all of the groups you are in with the command `groups`, and you can see all of the groups and users with the command `vim /etc/passwd`.