Go to the previous, next chapter.

User Accounts

Before adding user accounts you will need to decide where the user files will reside. The default is in /usr/users on the /usr partition. It is often a good idea to move the users off this partition onto another disk partition. One advantage of this is that you will be able to use dump/restore to backup and restore the users files without copying the system files as well.

Creating a File System

First of all you will need to examine your disk and decide on the most convenient area. Use the following commands to examine your disk(s):

    #df                         (This displays information  on
                                 the file systems currently in
                                 use.
 
    #/etc/chpt -q /dev/rrzNc    (Where  "N" is the  SCSI ID of
                                 the  disk. This  displays the
                                 entire  partition  table  for
                                 the disk.)

Using the tables produced by these commands you may choose a disk partition which is suitable for the user files, and which does not overlap any of the partitions already in use. Once you have selected a partition create a file system on as shown below. NB: This will destroy any data previously held on this partition.

	   #/etc/newfs -m % -i nnnn /dev/rrzNp rzxx

  1. -m % - The system normally reserves 10% of the file space for itself. You may specify another value if you wish to recuperate some disk space (e.g. -m 5 for 5% reserved).
  2. -i nnnn - This specifies the number of bytes per inode. The default is one inode for each 2048 bytes of data. This allows for a large number of small files on the disk. On most systems there will be a mixture of large and small files so a smaller number of inodes are required. You may wish to increase this value (e.g. 8192).
  3. rrznp - where n is the SCSI ID of the disk drive and p is the selected partition.
  4. rzxx - This is the type of disk on which you wish to build the file system (e.g. rz56).

The integrity of the new file system must now be checked as follows:

	   #/etc/fsck /dev/rznp

You may then mount the new file system as shown below:

	   #mkdir /usr/users
	   #/etc/mount /dev/rznp /usr/users

Do not forget to edit the file /etc/fstab so that this partition is mounted on subsequent reboots of the machine. Add the following line replacing rznp with the correct disk number and partition label:

	   /dev/rznp:/usr/users:rw:1:3:ufs::

See the "ULTRIX Guide to Disk Maintenance"(20) for further information concerning file systems and disk partitions.

User Identification

There is a central CERN user registration database in which all users of the CERN computing facilities should be registered. The necessary registration forms are available from the User Consultancy Office (UCO) in building 513.

When creating a new user account on your machine the user identification (uid) and group identification (gid) numbers should correspond with those in the central database. Either the phone command of ULTRIX or the who and userinfo commands on CERNVM may be used to obtain these numbers. See section Some Useful Tools, of this guide for a description of how to install phone.

Adding Users

If the user to be added is a member of a group not previously registered on your machine you will need to edit the file /etc/group. The following line adds the group c3 with the gid of 1028:

	   c3:*:1028:	

The next step is to use the command /etc/adduser to add the new user account to the system password file (/etc/passwd). The adduser command will also create a home directory for the user into which it will copy the files .cshrc, .login and .profile from the /usr/skel directory.

The default directory for users in ULTRIX is /usr/users, however, it is recommended that, at CERN, the users be grouped according to the CERN group identification. Thus a user's home directory path may be something like:

    /usr/users/groupcode/username     (e.g. /usr/users/c3/lovell)

If you choose to follow this recommendation do not take the defaults that adduser will prompt you with. Instead reply with the CERN groupcode when asked for the login group (e.g. c3) and enter the path /usr/users/c3 when prompted for the parent directory.

Go to the previous, next chapter.