User Tools

Site Tools


sto3_user_administration

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
sto3_user_administration [2018/04/13 11:08]
143.169.49.101 created
sto3_user_administration [2019/11/21 15:33] (current)
192.168.96.8 [existing users]
Line 1: Line 1:
 ====== User administration ====== ====== User administration ======
-To easy the creation of users, I made a couple of bash scripts that do all the magic. They are located in the directory **/​usr/​local/​bin** and are called **add_backup_user.sh** and **remove_backup_user.sh**+To easy the creation of users, I made a couple of bash scripts that do all the magic. They are located in the directory **/​usr/​local/​bin** and are called **add_backup_user.sh** and **remove_backup_user.sh**. These users will be mounted on all tesla servers.
 ====== add a user ====== ====== add a user ======
 We can create a user, assign some groups, create its home directory, set a quota, store in the openldap database, ​ all in one script. Example: We can create a user, assign some groups, create its home directory, set a quota, store in the openldap database, ​ all in one script. Example:
Line 6: Line 6:
 ./​add_backup_user.sh jsanctorum2 "​Jonathan Sanctorum"​ jonathan.sanctorum@uantwerpen.be adam 500G ******** ./​add_backup_user.sh jsanctorum2 "​Jonathan Sanctorum"​ jonathan.sanctorum@uantwerpen.be adam 500G ********
 </​code>​ </​code>​
-User jsanctorum2 with password ******* will be create ​and given the homedir /​data/​home/​jsanctorum2. the quota on this directory will be 500G, and the user will be part of the adam group. The complete name and an email address can be given as well.+User jsanctorum2 with password ******* will be created ​and given the homedir /​data/​home/​jsanctorum2. the quota on this directory will be 500G, and the user will be part of the adam group. The complete name and an email address can be given as well.
 Run the command without any parameters to get some help. Run the command without any parameters to get some help.
 <​code>​ <​code>​
Line 12: Line 12:
 Usage : ./​add_backup_user.sh username fullname email extragroups quota password Usage : ./​add_backup_user.sh username fullname email extragroups quota password
 </​code>​ </​code>​
 +extragroups can be more than one, separated by a colon(,) and without any spaces.
 +Finally, this script will add some extra entries in openldap to enable automount for the homedir of the user.
  
 ====== delete a user ====== ====== delete a user ======
 +removes the given user from openldap en destroys its dataset, with eventual data as well!!! handle with care!!!
 +<​code>​
 +root@sto3:/​usr/​local/​bin#​ ./​remove_backup_user.sh testuser2
 +removing user testuser2 and the dataset of the user data/​home/​testuser2
 +Are you sure you want to do this ? y
 +y
 +destroying dataset of user testuser2...
 +cannot open '​data/​home/​testuser2':​ dataset does not exist
 +removing automount entry from ldap database....
 +ldap_delete:​ No such object (32)
 +        matched DN: ou=auto.home,​ou=automount,​ou=adminm,​dc=visielab,​dc=be
 +removing testuser2 from ldap database
 +User does not exist: testuser2
 +</​code>​
 +In this example, the user testuser2 did not exist anymore. You get the necessary warnings and questions before the bash script does the removal.
 +
 +====== generate a password ======
 +./​gen_pwd.sh generates random passwords, which includes a numerical and a capitalized character, 8 characters long. 
 +<​code>​
 +root@sto3:/​usr/​local/​bin#​ ./​gen_pwd.sh ​
 +Aeg2Supa Ohsho6go as7aeQui Lohs8cie aeL6Eis3 oa8Ahhae mi0aiS4U rahvo1Ch wah4Usuo me3eeWeu
 +</​code>​
 +
 +====== existing users ======
 +  * astrabu ​ <​decrypt>​U2FsdGVkX1/​LrmyZ+a1HFvq7zhkXCWcE+rOb1g+VaSw=</​decrypt>​
 +  * ugent   <​decrypt>​U2FsdGVkX18FSS2+pBRFxqu2u47BlaF/​DmknxLTTQWA=</​decrypt>​
 +  * stobu  <​decrypt>​U2FsdGVkX1+6jLJUhPLR1xoNJJhMDrrGuL9Ze0KfEl4=</​decrypt>​
 +  * xre <​decrypt>​U2FsdGVkX1/​LEJgKdCQSdT1ST7yMdh3qNg+vc46VB+o=</​decrypt> ​
 +  * metroflex <​decrypt>​U2FsdGVkX181XrKZ4ZMg6W05OkqnUoGh3e+ra/​RuwcA=</​decrypt>​
 +  * bqminded <​decrypt>​U2FsdGVkX18pVAgcPmjhChuKbNqi8HEhbeGnCUn1SCs=</​decrypt>​
 +  * software
 +
  
sto3_user_administration.1523617720.txt.gz · Last modified: 2018/04/13 11:08 by 143.169.49.101