Create new user: Difference between revisions

From DISI
Jump to navigation Jump to search
No edit summary
 
(9 intermediate revisions by one other user not shown)
Line 1: Line 1:
Create users and superuser on the LDAP GUI:
===Identify a UID===
'''Check if a uid that is not taken by any other users'''. Start from 150**
On CentOS 6
$ getent passwd | grep 150**
On CentOS 7
$ id 150**
 
===Create users and superuser on the LDAP GUI:===
  https://ds.ucsf.bkslab.org/ldapadmin/cmd.php
  https://ds.ucsf.bkslab.org/ldapadmin/cmd.php


To create a visitor:  
====To create a visitor: ====
  Click OU=Visitors
  Click OU=Visitors
  Click Create new entry here
  Click Create new entry here
  Select Generic: User Account
  Select Generic: User Account
  Fill in appropriate sections
  Fill in appropriate sections
** John might want future home directory in /nfs/ex9/work
  -password should be encrypted with sha512
  -password should be encrypted with sha512
  -group should be visitors
  -group should be visitors
Keep the uid LDAP suggested and edit in the one you picked later.
==== Create User's Home Directory ====
Log in as root on mem
$ sh /nfs/home/create-visitor.sh <user_name>
Or on ex9 (qof)
$ mkdir /export/ex9/work/<username>
=== Generate ssh for login ===
====Create ssh key ====
In the user's home directory's personal computer:
$ ssh keygen
==== Add user's public key to Portal ====
$ ssh s_khtang@portal.ucsf.bkslab.org
$ sudo -i
$ cd /opt/keys/user
$ vim <username>
Copy the .rsa_key.pub content into the file
==== Add user into Portal ====
On LDAP Admin
Choose ''' dc=bkslab,dc=org (17)''' > '''Group''' > '''Portal'''
Enter <username> in Add Value
=== Add s_ user in alpha ===
Since Alpha was created before ldap admin system, new user must be created individually on this machine.
Add the s_ user in
vim /etc/passwd
vim /etc/group
Change password
passwd s_<user>
[[Category: Ben]] [[Category:Sysadmin]]

Latest revision as of 22:47, 4 January 2022

Identify a UID

Check if a uid that is not taken by any other users. Start from 150**

On CentOS 6
$ getent passwd | grep 150**
On CentOS 7
$ id 150**

Create users and superuser on the LDAP GUI:

https://ds.ucsf.bkslab.org/ldapadmin/cmd.php

To create a visitor:

Click OU=Visitors
Click Create new entry here
Select Generic: User Account
Fill in appropriate sections
** John might want future home directory in /nfs/ex9/work
-password should be encrypted with sha512
-group should be visitors
Keep the uid LDAP suggested and edit in the one you picked later.

Create User's Home Directory

Log in as root on mem

$ sh /nfs/home/create-visitor.sh <user_name>

Or on ex9 (qof)

$ mkdir /export/ex9/work/<username>

Generate ssh for login

Create ssh key

In the user's home directory's personal computer:

$ ssh keygen

Add user's public key to Portal

$ ssh s_khtang@portal.ucsf.bkslab.org
$ sudo -i
$ cd /opt/keys/user
$ vim <username>
Copy the .rsa_key.pub content into the file

Add user into Portal

On LDAP Admin

Choose  dc=bkslab,dc=org (17) > Group > Portal
Enter <username> in Add Value

Add s_ user in alpha

Since Alpha was created before ldap admin system, new user must be created individually on this machine.

Add the s_ user in

vim /etc/passwd 
vim /etc/group 

Change password

passwd s_<user>