|
0
|
1 |
Here's how to set up the qmail groups and the qmail users.
|
|
|
2 |
|
|
|
3 |
On some systems there are commands that make this easy. Solaris and
|
|
|
4 |
Linux:
|
|
|
5 |
|
|
|
6 |
# groupadd nofiles
|
|
|
7 |
# useradd -g nofiles -d /var/qmail/alias alias
|
|
|
8 |
# useradd -g nofiles -d /var/qmail qmaild
|
|
|
9 |
# useradd -g nofiles -d /var/qmail qmaill
|
|
|
10 |
# useradd -g nofiles -d /var/qmail qmailp
|
|
|
11 |
# groupadd qmail
|
|
|
12 |
# useradd -g qmail -d /var/qmail qmailq
|
|
|
13 |
# useradd -g qmail -d /var/qmail qmailr
|
|
|
14 |
# useradd -g qmail -d /var/qmail qmails
|
|
|
15 |
|
|
|
16 |
FreeBSD 2.2:
|
|
|
17 |
|
|
|
18 |
# pw groupadd nofiles
|
|
|
19 |
# pw useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent
|
|
|
20 |
# pw useradd qmaild -g nofiles -d /var/qmail -s /nonexistent
|
|
|
21 |
# pw useradd qmaill -g nofiles -d /var/qmail -s /nonexistent
|
|
|
22 |
# pw useradd qmailp -g nofiles -d /var/qmail -s /nonexistent
|
|
|
23 |
# pw groupadd qmail
|
|
|
24 |
# pw useradd qmailq -g qmail -d /var/qmail -s /nonexistent
|
|
|
25 |
# pw useradd qmailr -g qmail -d /var/qmail -s /nonexistent
|
|
|
26 |
# pw useradd qmails -g qmail -d /var/qmail -s /nonexistent
|
|
|
27 |
|
|
|
28 |
BSDI 2.0:
|
|
|
29 |
|
|
|
30 |
# addgroup nofiles
|
|
|
31 |
# adduser -g nofiles -H/var/qmail/alias -G,,, -s/dev/null -P'*' alias
|
|
|
32 |
# adduser -g nofiles -H/var/qmail -G,,, -s/dev/null -P'*' qmaild
|
|
|
33 |
# adduser -g nofiles -H/var/qmail -G,,, -s/dev/null -P'*' qmaill
|
|
|
34 |
# adduser -g nofiles -H/var/qmail -G,,, -s/dev/null -P'*' qmailp
|
|
|
35 |
# addgroup qmail
|
|
|
36 |
# adduser -g qmail -H/var/qmail -G,,, -s/dev/null -P'*' qmailq
|
|
|
37 |
# adduser -g qmail -H/var/qmail -G,,, -s/dev/null -P'*' qmailr
|
|
|
38 |
# adduser -g qmail -H/var/qmail -G,,, -s/dev/null -P'*' qmails
|
|
|
39 |
|
|
|
40 |
AIX:
|
|
|
41 |
|
|
|
42 |
# mkgroup -A nofiles
|
|
|
43 |
# mkuser pgrp=nofiles home=/var/qmail/alias shell=/bin/true alias
|
|
|
44 |
# mkuser pgrp=nofiles home=/var/qmail shell=/bin/true qmaild
|
|
|
45 |
# mkuser pgrp=nofiles home=/var/qmail shell=/bin/true qmaill
|
|
|
46 |
# mkuser pgrp=nofiles home=/var/qmail shell=/bin/true qmailp
|
|
|
47 |
# mkgroup -A qmail
|
|
|
48 |
# mkuser pgrp=qmail home=/var/qmail shell=/bin/true qmailq
|
|
|
49 |
# mkuser pgrp=qmail home=/var/qmail shell=/bin/true qmailr
|
|
|
50 |
# mkuser pgrp=qmail home=/var/qmail shell=/bin/true qmails
|
|
|
51 |
|
|
|
52 |
On other systems, you will have to edit /etc/group and /etc/passwd
|
|
|
53 |
manually. First add two new lines to /etc/group, something like
|
|
|
54 |
|
|
|
55 |
qmail:*:2107:
|
|
|
56 |
nofiles:*:2108:
|
|
|
57 |
|
|
|
58 |
where 2107 and 2108 are different from the other gids in /etc/group.
|
|
|
59 |
Next (using vipw) add six new lines to /etc/passwd, something like
|
|
|
60 |
|
|
|
61 |
alias:*:7790:2108::/var/qmail/alias:/bin/true
|
|
|
62 |
qmaild:*:7791:2108::/var/qmail:/bin/true
|
|
|
63 |
qmaill:*:7792:2108::/var/qmail:/bin/true
|
|
|
64 |
qmailp:*:7793:2108::/var/qmail:/bin/true
|
|
|
65 |
qmailq:*:7794:2107::/var/qmail:/bin/true
|
|
|
66 |
qmailr:*:7795:2107::/var/qmail:/bin/true
|
|
|
67 |
qmails:*:7796:2107::/var/qmail:/bin/true
|
|
|
68 |
|
|
|
69 |
where 7790 through 7796 are _new_ uids, 2107 is the qmail gid, and 2108
|
|
|
70 |
is the nofiles gid. Make sure you use the nofiles gid for qmaild,
|
|
|
71 |
qmaill, qmailp, and alias, and the qmail gid for qmailq, qmailr, and
|
|
|
72 |
qmails.
|