User Tools

Site Tools


howtos:admin:setup_user_and_model_accounts

This is an old revision of the document!


Setting up Accounts on a new VM

Add user

  • Add the user buddy boy with username bboy
useradd -s /bin/csh -c "Buddy Boy user account" -d /users/bboy bboy
  • set the user's password
passwd bboy
  • add samba user and restart samba service - if this user needs access to the model account through a drive mapping
smbpasswd -a bboy
/etc/init.d/smb restart
  • remove the user's home directory
cd /users
rm -rf bboy
  • make a new one and copy all files (including hidden) from another user
cd /users
mkdir bboy
cp otherUser/* bboy/
cp otherUser/.cshrc bboy/
cp otherUser/.login bboy/
  • set perms of the directory and the files:
chmod 755 bboy
chown -R bboy:bboy bboy
chmod 664 bboy/* bboy/.cshrc bboy/.login
  • Add the user to the model accounts they need access to:
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>

Add a Model Account

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 and use the same, if not leave out the “-u userIDFromOtherServer” part of the command below
useradd -s /bin/csh -c "model1 model account" -d /models/model1 -u userIDFromOtherServer model1

* set the model's password

passwd model1
  • update group file to have samm in model's group
vi /etc/group 
- find model and add samm and all users 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>
  • Move to the models directory
cd /models
  • Reconfigure the default directory for this user /models and delete the created model1 directory
rm -rf model1 
  • make a new one and copy all files (including hidden) from modelacct to model1
mkdir reu
cp modelacct/*.init model1/
cp modelacct/*.links model1/
cp modelacct/.cshrc model1/
cp modelacct/.login model1/
  • set perms :
chmod 770 model1
chmod g+s model1
chown -R model1:model1 model1
chmod 664 model1/* model1/.cshrc model1/.login

Prepare Model Directory Structure

howtos/admin/setup_user_and_model_accounts.1299762815.txt.gz · Last modified: 2011/03/10 13:13 by shona.weldon