Likewise, excluding -s /bin/tcsh causes /bin/bash to
be assigned as the default shell.
The /etc/group file holds information about the different groups on your Linux system and the
users who belong to them. Groups are useful for enabling multiple users to share access to the
same files while denying access to others. Peek at the /etc/group file, and you find something
similar to this:
bin:x:1:root,bin,daemon
daemon:x:2:root,bin,daemon
sys:x:3:root,bin,adm
adm:x:4:root,adm,daemon
tty:x:5:
disk:x:6:root
lp:x:7:daemon,lp
mem:x:8:
kmem:x:9:
wheel:x:10:root,joe,mary
apache:x:48:mary
.
.
.
nobody:x:99:
users:x:100:
chris:x:500
sheree:x:501
Each line in the group file contains the name of a group, the group ID number associated with it,
and a list of users in that group. By default, each user is added to his or her own group, beginning
with GID 500. Note that mary was added to the wheel and apache groups instead of having her
own group.
It is actually rather significant that mary was added to the wheel group. By doing this, you grant
her the capability to use the sudo command to run commands as the root user (provided that
sudo is configured as described earlier in this chapter).
Setting User Defaults
The useradd command determines the default values for new accounts by reading the
/etc/login.
Pages:
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361