4. Accounts
Users need the first two of the following for their accounts, while the system needs 3-7: (3 minimum, 7 maximum)
All of the preceding information is in the /etc/passwd file.
So if you type more /etc/passwd you will see this: (example user) Joe:x:100:10:Joe
Smith:/export/home/Joe:/usr/bin/ksh
1 2 3 4 5 6 7
The above numbers show which field is what in the listing (if the numbers don't align
below the section on your browser, just count by each colon (:) so Joe is 1, x is 2, 100
is 3, etc.) Some common groups are: staff, nobody, other, sysadmin, sys, and adm.
Note: The password will not show for security. The password is kept
in /etc/shadow and is encrypted. When logged in as root (/) you are put in a special
Bourne shell.
There are three ways to add users:
For text files there are records, fields and comments and a : (colon) usually separates the fields, this is considered the format of files (including etc/passwd.)
To make a user using option 1:
Edit the files listed to reflect the new user, and make a home directory. To make a
home directory (for fictional user joe) do this:
cp r /etc/skel export/home/joe (the /etc/skel is
a default profile you make, can also be called whatever you want) or mkdir
/export/home/joe
To make a user using option 2:
Type useradd then uses the following options:
The entire command will look like this (type on one line): useradd u 1001 g 10 c joe shmoe s /usr/bin/ksh d /export/home m k /etc/skel joe (the user name will be put last)
Option 3 to create a user, is to use the admintool, which is a GUI based tool, that is self-explanatory and is very easy to use.
To change a group - chgrp r [group you want i.e. adm] /export/home/joe
To make a password - passwd joe (you will then be prompted to enter a password)
Ways to check your new account:
Go to Chapter 3
Go to Index
Go to Chapter 5