User Tools

Site Tools


howtos:admin:setup_user_and_model_accounts

Setting up Accounts on a new VM

✅ CONTENT MIGRATED TO GURU ON FEBRUARY 22, 2024

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

NOTE if you want to list the samba users you can do

cat /etc/samba/smbpasswd
  • 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>

Note: An alternative terminal-based editor to vi is nano.

Making the drive mapping for the user

On the user's client machine they will need a drive mounting to the server.

Make the mount out to the end of the models directory such as say the “N” drive is mounted as:

    \\myserver\models

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 (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
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 model
  • copy all files (including hidden) from some other working model account <modelacct> to model1
cp modelExample/*.init model1/
cp modelExample/*.links model1/
cp modelExample/.cshrc model1/
cp modelExample/.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.txt · Last modified: 2024/02/22 18:36 by marcus.williams