INSTALL.ids.md (2951B)
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 ``` 7 # groupadd nofiles 8 # useradd -g nofiles -d /var/qmail/alias alias 9 # useradd -g nofiles -d /var/qmail qmaild 10 # useradd -g nofiles -d /var/qmail qmaill 11 # useradd -g nofiles -d /var/qmail qmailp 12 # groupadd qmail 13 # useradd -g qmail -d /var/qmail qmailq 14 # useradd -g qmail -d /var/qmail qmailr 15 # useradd -g qmail -d /var/qmail qmails 16 ``` 17 18 FreeBSD 2.2: 19 20 ``` 21 # pw groupadd nofiles 22 # pw useradd alias -g nofiles -d /var/qmail/alias -s /nonexistent 23 # pw useradd qmaild -g nofiles -d /var/qmail -s /nonexistent 24 # pw useradd qmaill -g nofiles -d /var/qmail -s /nonexistent 25 # pw useradd qmailp -g nofiles -d /var/qmail -s /nonexistent 26 # pw groupadd qmail 27 # pw useradd qmailq -g qmail -d /var/qmail -s /nonexistent 28 # pw useradd qmailr -g qmail -d /var/qmail -s /nonexistent 29 # pw useradd qmails -g qmail -d /var/qmail -s /nonexistent 30 ``` 31 32 BSDI 2.0: 33 34 ``` 35 # addgroup nofiles 36 # adduser -g nofiles -H/var/qmail/alias -G,,, -s/dev/null -P'*' alias 37 # adduser -g nofiles -H/var/qmail -G,,, -s/dev/null -P'*' qmaild 38 # adduser -g nofiles -H/var/qmail -G,,, -s/dev/null -P'*' qmaill 39 # adduser -g nofiles -H/var/qmail -G,,, -s/dev/null -P'*' qmailp 40 # addgroup qmail 41 # adduser -g qmail -H/var/qmail -G,,, -s/dev/null -P'*' qmailq 42 # adduser -g qmail -H/var/qmail -G,,, -s/dev/null -P'*' qmailr 43 # adduser -g qmail -H/var/qmail -G,,, -s/dev/null -P'*' qmails 44 ``` 45 46 AIX: 47 48 ``` 49 # mkgroup -A nofiles 50 # mkuser pgrp=nofiles home=/var/qmail/alias shell=/bin/true alias 51 # mkuser pgrp=nofiles home=/var/qmail shell=/bin/true qmaild 52 # mkuser pgrp=nofiles home=/var/qmail shell=/bin/true qmaill 53 # mkuser pgrp=nofiles home=/var/qmail shell=/bin/true qmailp 54 # mkgroup -A qmail 55 # mkuser pgrp=qmail home=/var/qmail shell=/bin/true qmailq 56 # mkuser pgrp=qmail home=/var/qmail shell=/bin/true qmailr 57 # mkuser pgrp=qmail home=/var/qmail shell=/bin/true qmails 58 ``` 59 60 On other systems, you will have to edit /etc/group and /etc/passwd 61 manually. First add two new lines to /etc/group, something like 62 63 ``` 64 qmail:*:2107: 65 nofiles:*:2108: 66 ``` 67 68 where 2107 and 2108 are different from the other gids in /etc/group. 69 Next (using vipw) add six new lines to /etc/passwd, something like 70 71 ``` 72 alias:*:7790:2108::/var/qmail/alias:/bin/true 73 qmaild:*:7791:2108::/var/qmail:/bin/true 74 qmaill:*:7792:2108::/var/qmail:/bin/true 75 qmailp:*:7793:2108::/var/qmail:/bin/true 76 qmailq:*:7794:2107::/var/qmail:/bin/true 77 qmailr:*:7795:2107::/var/qmail:/bin/true 78 qmails:*:7796:2107::/var/qmail:/bin/true 79 ``` 80 81 where 7790 through 7796 are _new_ uids, 2107 is the qmail gid, and 2108 82 is the nofiles gid. Make sure you use the nofiles gid for qmaild, 83 qmaill, qmailp, and alias, and the qmail gid for qmailq, qmailr, and 84 qmails.