dot

packages and services management
Log | Files | Refs | README

commit 45b22e60abfd0727f117d3b0a53098bd25f1823c
parent e59e0fd52a6569ad1d6d722441095f7df59c0800
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 16 Jun 2018 14:25:28 +0200

Merge branch 'master' of josuah.net:conf

Diffstat:
Mssh/config | 4++--
Muri/ssh | 5-----
Auser/README | 12++++++++++++
Muser/collectd/add | 4++--
Muser/dns/add | 4++--
Muser/git/add | 4++--
Muser/irc/add | 4++--
Muser/mail/add | 11+++++++++--
Muser/qmail/add | 18+++++++++---------
Muser/tor/add | 4++--
Muser/u9fs/add | 4++--
Auser/useradd | 13+++++++++++++
Muser/venti/add | 4++--
13 files changed, 59 insertions(+), 32 deletions(-)

diff --git a/ssh/config b/ssh/config @@ -1,5 +1,5 @@ -host * - AddKeysToAgent yes +AddKeysToAgent yes +ServerAliveInterval 30 host ::1 IdentityFile /mnt/key/josuah.key diff --git a/uri/ssh b/uri/ssh @@ -5,11 +5,6 @@ ssh://git@josuah.net ssh://josuahdemangeon@grex.org ssh://root@josuah.net ssh://root@josuah.net:2222 -ssh://root@josuah.net:10001 -ssh://root@josuah.net:10002 -ssh://root@josuah.net:10003 -ssh://root@josuah.net:10004 -ssh://root@josuah.net:10005 ssh://mail@localhost ssh://irc@localhost ssh://root@localhost diff --git a/user/README b/user/README @@ -0,0 +1,12 @@ +Most systems provide an useradd(8) and groupadd(8) programs, but +the syntax of these commands is not standard. + +A subset of features of useradd seems to be present of all +implementation, which lead to the following usage: + + useradd [-g grp] [-G grps,...] [-d home] [-u uid] [-s shell] user + groupadd [-g gid] usr + +On busybox-based system, only an adduser is provided, but the syntax +is the one of useradd, with -h instead of -d for the home directory. +Then, a 'useradd' shell script wrapper is provided in this directory. diff --git a/user/collectd/add b/user/collectd/add @@ -1,3 +1,3 @@ -#!/9/bin/rc -e +#!/pack/bin/execlineb -user add -d /home/collectd -s /sbin/nologin collectd +useradd -d /home/collectd -s /sbin/nologin collectd diff --git a/user/dns/add b/user/dns/add @@ -1,3 +1,3 @@ -#!/9/bin/rc -e +#!/pack/bin/execlineb -user add dns +useradd dns diff --git a/user/git/add b/user/git/add @@ -1,5 +1,5 @@ -#!/9/bin/rc -e +#!/pack/bin/execlineb -user add -d /home/git -s `{which git-shell} git +useradd -d /home/git -s `{which git-shell} git cp -R `{dirname $0}^/git-shell-commands /home/git diff --git a/user/irc/add b/user/irc/add @@ -1,7 +1,7 @@ -#!/9/bin/rc -e +#!/pack/bin/execlineb # irc client holding the logs and to connect to to start chatting -user add -s /home/irc/attach -d /home/irc irc +useradd -s /home/irc/attach -d /home/irc irc cp `{dirname $0}^/attach /home/irc/attach chown irc /home/irc/attach diff --git a/user/mail/add b/user/mail/add @@ -1,6 +1,13 @@ -#!/9/bin/rc -e +#!/9/bin/rc -user add -d /home/mail -s /home/mail/attach mail +groupadd key +useradd -g key -d /home/mail -s /home/mail/attach mail + +mkdir -p /home/mail/.config/enchive +ln -s /mnt/key/enchive.sec /mnt/key/enchive.pub /home/mail/.config/enchive/ + +mkdir -p /home/mail/.ssh/ +cp -R $HOME/conf/ssh/authorized_keys /home/mail/.ssh/ mkdir -p /home/mail/.mblaze/ cp mblazerc /home/mail/.mblaze/profile diff --git a/user/qmail/add b/user/qmail/add @@ -1,12 +1,12 @@ #!/9/bin/rc -group add nofiles -user add -g nofiles -d /home/qmail/alias -s `{whatis true} alias -user add -g nofiles -d /home/qmail -s `{whatis true} qmaild -user add -g nofiles -d /home/qmail -s `{whatis true} qmaill -user add -g nofiles -d /home/qmail -s `{whatis true} qmailp +groupadd nofiles +useradd -g nofiles -d /home/qmail/alias -s `{whatis true} alias +useradd -g nofiles -d /home/qmail -s `{whatis true} qmaild +useradd -g nofiles -d /home/qmail -s `{whatis true} qmaill +useradd -g nofiles -d /home/qmail -s `{whatis true} qmailp -group add qmail -user add -g qmail -d /home/qmail -s `{whatis true} qmailq -user add -g qmail -d /home/qmail -s `{whatis true} qmailr -user add -g qmail -d /home/qmail -s `{whatis true} qmails +groupadd qmail +useradd -g qmail -d /home/qmail -s `{whatis true} qmailq +useradd -g qmail -d /home/qmail -s `{whatis true} qmailr +useradd -g qmail -d /home/qmail -s `{whatis true} qmails diff --git a/user/tor/add b/user/tor/add @@ -1,3 +1,3 @@ -#!/9/bin/rc -e +#!/pack/bin/execlineb -user add -d /home/tor tor +useradd -d /home/tor tor diff --git a/user/u9fs/add b/user/u9fs/add @@ -1,3 +1,3 @@ -#!/9/bin/rc -e +#!/pack/bin/execlineb -user add -d /home/u9fs u9fs +useradd -d /home/u9fs u9fs diff --git a/user/useradd b/user/useradd @@ -0,0 +1,13 @@ +#!/bin/sh -e +# wrapper around adduser for busybox systems +IFS=' +' + +argv=useradd + +while [ $# -gt 0 ] +do [ "$1" = -d ] arg=-h || arg=$1 + argv=$argv$IFS$arg +done + +exec $argv diff --git a/user/venti/add b/user/venti/add @@ -1,3 +1,3 @@ -#!/9/bin/rc -e +#!/pack/bin/execlineb -user add -d /home/venti venti +useradd -d /home/venti venti