Difference between revisions of "Adding local users"

From PDP/Grid Wiki
Jump to navigationJump to search
m
m
Line 5: Line 5:
 
with either the arguments like:
 
with either the arguments like:
  
   -e davidg@nikhef.nl -n "Test User" -l "H156" -p "+31 20 592 2179" testusr2
+
   -e test@example.com -n "Test User" -l "NIKHEF H1.56" -p "+31 20 592 2179" -g 100 testusr2
  
 
or answer all questions. You have to be one of the predefined administors in order to complete the procedure.
 
or answer all questions. You have to be one of the predefined administors in order to complete the procedure.
Line 18: Line 18:
 
             [-l loc] <username>
 
             [-l loc] <username>
  
  This script will create a new user in the NDPF, updating the LDAP
+
This script will create a new user in the NDPF, updating the LDAP
  directory and initializing the user's home directory. The opportunity
+
directory and initializing the user's home directory. The opportunity
  to edit the ssh authorized_keys file is presented at the end.
+
to edit the ssh authorized_keys file is presented at the end.
  
  The uidNumber is automatically obtained from the LDAP directory, if
+
The uidNumber is automatically obtained from the LDAP directory, if
  the appropriate description entry in ou=LocalUsers, stating the next
+
the appropriate description entry in ou=LocalUsers, stating the next
  available uidNumber, is present. It is incremented on user creation.
+
available uidNumber, is present. It is incremented on user creation.
  
  Containts:
+
Containts:
  * this script MUST be run on hooimijt.nikhef.nl
+
* this script MUST be run on hooimijt.nikhef.nl
  * the LDAP directory (master) is assumed to be at ldaps://trog.nikhef.nl/
+
* the LDAP directory (master) is assumed to be at ldaps://trog.nikhef.nl/

Revision as of 15:14, 26 May 2006

Login to hooimijt first, and then run the script

 /export/perm/adm/bin/makeuser <username>

with either the arguments like:

 -e test@example.com -n "Test User" -l "NIKHEF H1.56" -p "+31 20 592 2179" -g 100 testusr2

or answer all questions. You have to be one of the predefined administors in order to complete the procedure.

Finally, add the public ssh key of the user to

/home/<userid>/.ssh/authorized_keys2

and the new user should be able to login. The option to edit the authorized_keys file is also presented to you just before the makeuser script terminates.

Documentation

 Usage: ./makeuser [-h] [-g gid] [-e email] [-n name] [-p number] 
            [-l loc] <username>

This script will create a new user in the NDPF, updating the LDAP directory and initializing the user's home directory. The opportunity to edit the ssh authorized_keys file is presented at the end.

The uidNumber is automatically obtained from the LDAP directory, if the appropriate description entry in ou=LocalUsers, stating the next available uidNumber, is present. It is incremented on user creation.

Containts:

  • this script MUST be run on hooimijt.nikhef.nl
  • the LDAP directory (master) is assumed to be at ldaps://trog.nikhef.nl/