1 |
swift |
1.14 |
<?xml version='1.0' encoding='UTF-8'?> |
2 |
|
|
<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> |
3 |
|
|
|
4 |
swift |
1.5 |
<!-- The content of this document is licensed under the CC-BY-SA license --> |
5 |
|
|
<!-- See http://creativecommons.org/licenses/by-sa/1.0 --> |
6 |
|
|
|
7 |
neysx |
1.42 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-install-finalise.xml,v 1.41 2005/03/28 11:30:52 swift Exp $ --> |
8 |
swift |
1.7 |
|
9 |
swift |
1.3 |
<sections> |
10 |
swift |
1.34 |
|
11 |
neysx |
1.42 |
<version>2.1</version> |
12 |
|
|
<date>2005-11-21</date> |
13 |
swift |
1.34 |
|
14 |
swift |
1.1 |
<section> |
15 |
|
|
<title>User Administration</title> |
16 |
swift |
1.4 |
<subsection> |
17 |
|
|
<title>Adding a User for Daily Use</title> |
18 |
|
|
<body> |
19 |
|
|
|
20 |
|
|
<p> |
21 |
|
|
Working as root on a Unix/Linux system is <e>dangerous</e> and should be avoided |
22 |
swift |
1.10 |
as much as possible. Therefore it is <e>strongly</e> recommended to add a user |
23 |
swift |
1.4 |
for day-to-day use. |
24 |
|
|
</p> |
25 |
|
|
|
26 |
|
|
<p> |
27 |
swift |
1.32 |
The groups the user is member of define what activities the user can perform. |
28 |
|
|
The following table lists a number of important groups you might wish to use: |
29 |
|
|
</p> |
30 |
|
|
|
31 |
|
|
<table> |
32 |
|
|
<tr> |
33 |
|
|
<th>Group</th> |
34 |
|
|
<th>Description</th> |
35 |
|
|
</tr> |
36 |
|
|
<tr> |
37 |
|
|
<ti>audio</ti> |
38 |
|
|
<ti>be able to access the audio devices</ti> |
39 |
|
|
</tr> |
40 |
|
|
<tr> |
41 |
|
|
<ti>cdrom</ti> |
42 |
neysx |
1.40 |
<ti>be able to directly access optical devices</ti> |
43 |
swift |
1.32 |
</tr> |
44 |
|
|
<tr> |
45 |
|
|
<ti>floppy</ti> |
46 |
swift |
1.38 |
<ti>be able to directly access floppy devices</ti> |
47 |
swift |
1.32 |
</tr> |
48 |
|
|
<tr> |
49 |
|
|
<ti>games</ti> |
50 |
|
|
<ti>be able to play games</ti> |
51 |
|
|
</tr> |
52 |
|
|
<tr> |
53 |
neysx |
1.42 |
<ti>portage</ti> |
54 |
|
|
<ti>be able to use <c>emerge --pretend</c> as a normal user</ti> |
55 |
|
|
</tr> |
56 |
|
|
<tr> |
57 |
swift |
1.32 |
<ti>usb</ti> |
58 |
|
|
<ti>be able to access USB devices</ti> |
59 |
|
|
</tr> |
60 |
|
|
<tr> |
61 |
|
|
<ti>video</ti> |
62 |
|
|
<ti> |
63 |
|
|
be able to access video capturing hardware and doing hardware |
64 |
|
|
acceleration |
65 |
|
|
</ti> |
66 |
|
|
</tr> |
67 |
|
|
<tr> |
68 |
|
|
<ti>wheel</ti> |
69 |
|
|
<ti>be able to use <c>su</c></ti> |
70 |
|
|
</tr> |
71 |
|
|
</table> |
72 |
|
|
|
73 |
|
|
<p> |
74 |
swift |
1.4 |
For instance, to create a user called <c>john</c> who is member of the |
75 |
swift |
1.32 |
<c>wheel</c>, <c>users</c> and <c>audio</c> groups, log in as root first |
76 |
|
|
(only root can create users) and run <c>useradd</c>: |
77 |
swift |
1.4 |
</p> |
78 |
|
|
|
79 |
|
|
<pre caption="Adding a user for day-to-day use"> |
80 |
swift |
1.30 |
Login: <i>root</i> |
81 |
|
|
Password: <comment>(Your root password)</comment> |
82 |
|
|
|
83 |
swift |
1.38 |
# <i>useradd -m -G users,wheel,audio -s /bin/bash john</i> |
84 |
swift |
1.4 |
# <i>passwd john</i> |
85 |
|
|
Password: <comment>(Enter the password for john)</comment> |
86 |
|
|
Re-enter password: <comment>(Re-enter the password to verify)</comment> |
87 |
|
|
</pre> |
88 |
|
|
|
89 |
|
|
<p> |
90 |
swift |
1.26 |
If a user ever needs to perform some task as root, they can use <c>su -</c> |
91 |
swift |
1.25 |
to temporarily receive root privileges. Another way is to use the <c>sudo</c> |
92 |
swift |
1.4 |
package which is, if correctly configured, very secure. |
93 |
swift |
1.1 |
</p> |
94 |
|
|
|
95 |
|
|
</body> |
96 |
swift |
1.4 |
</subsection> |
97 |
swift |
1.3 |
</section> |
98 |
|
|
</sections> |