User Tools

Site Tools


howtos:admin:setup_user_and_model_accounts

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
howtos:admin:setup_user_and_model_accounts [2010/07/20 13:27]
shona.weldon
howtos:admin:setup_user_and_model_accounts [2011/05/03 15:24]
marcus.williams
Line 2: Line 2:
  
 ===== Add user ===== ===== Add user =====
-  * If they already exist on another server get the user id from that server and use the same for example adding user bboy:+  * Add the user buddy boy with username ​bboy
 <​code>​ <​code>​
-useradd -s /bin/csh -c "Buddy Boy user account"​ -d /​users/​bboy ​-u userIDFromServerOr1000 ​bboy+useradd -s /bin/csh -c "Buddy Boy user account"​ -d /users/bboy bboy 
 </​code>​ </​code>​
   * set the user's password ​   * set the user's password ​
Line 14: Line 15:
 smbpasswd -a bboy smbpasswd -a bboy
 /​etc/​init.d/​smb restart /​etc/​init.d/​smb restart
 +</​code>​
 +NOTE if you want to list the samba users you can do
 +<​code>​
 +cat /​etc/​samba/​smbpasswd
 </​code>​ </​code>​
  
Line 35: Line 40:
 chmod 664 bboy/* bboy/.cshrc bboy/.login chmod 664 bboy/* bboy/.cshrc bboy/.login
 </​code>​  </​code>​
 +
 +  * Add the user to the model accounts they need access to:
 +<​code>​
 +vi /​etc/​group ​
 +- find model and add the new user to allowed to access that account as comma separated list:
 +- enter "edit mode" by typing "​i"​ then change the line to look like
 +model1:​x:​1234:​samm,​bboy,​otherUser
 +- go back to command mode with <esc> key
 +- write and quit vi with command:
 +:wq <​enter>​
 +</​code>​
  
 ===== Add a Model Account ===== ===== Add a Model Account =====
-  ​* If the model already ​exist on a serverget ​the model'​s user id from feynman ​and use the sem+This process must be done as root logged in through putty to the server 
 + 
 +  ​* If the model already ​exists ​on another server then get the model'​s user id from that server (found in the file /etc/passwd using //vi// or //​nano//​) ​and use the same, if not leave out the "-u userIDFromOtherServer"​ part of the command below
 <​code>​ <​code>​
-useradd -s /bin/csh -c "​model1 model account"​ -d /​models/​model1 -u userIDFromFeynmanOr2000 ​model1+useradd -s /bin/csh -c "​model1 model account"​ -d /​models/​model1 -u userIDFromOtherServer ​model1
 </​code>​ </​code>​
- * set the model'​s password ​+ 
 +  * set the model'​s password ​
 <​code>​ <​code>​
 passwd model1 passwd model1
Line 55: Line 74:
 :wq <​enter>​ :wq <​enter>​
 </​code>​ </​code>​
-  * Reconfigure ​the default directory for this user /models ​and delete the created model1 ​directory+  * Move to the models directory
 <​code>​ <​code>​
-rm -rf model1 ​+cd /models
 </​code>​ </​code>​
-  * make a new one and copy all files (including hidden) from modelacct to model1+  * Reconfigure the default directory for this model 
 +  * copy all files (including hidden) from some other working model account <modelacctto model1
 <​code>​ <​code>​
-mkdir reu +cp modelacct/​*.init model1/ 
-cp modelacct/​* ​reu+cp modelacct/*.links model1
-cp modelacct/​.cshrc ​reu+cp modelacct/​.cshrc ​model1
-cp modelacct/​.login ​reu/+cp modelacct/​.login ​model1/
 </​code>​ </​code>​
-  * set perms:+  * set perms :
 <​code>​ <​code>​
 chmod 770 model1 chmod 770 model1
Line 78: Line 98:
   * Put the model file structure onto the model1 accountif it already exists elsewhere ​ or else create it:   * Put the model file structure onto the model1 accountif it already exists elsewhere ​ or else create it:
     * [[howtos:​admin:​Model Family Directory Structure]]     * [[howtos:​admin:​Model Family Directory Structure]]
- 
howtos/admin/setup_user_and_model_accounts.txt · Last modified: 2024/02/22 18:36 by marcus.williams