cfgfoo

git clone https://orangeshoelaces.net/git/cfgfoo.git

1c63a2ed3b3ade21e13602213efa3aa7fd9b1767

Author: Vasilii Kolobkov on 12/19/2018

Committer: Vasilii Kolobkov on 12/19/2018

Create users on OpenBSD

Stats

aliases              | 2 ++
steps/users/obsd/add | 7 +++++++
2 files changed, 9 insertions(+)

Patch

diff --git a/aliases b/aliases
index 701467a..ee3a59b 100644
--- a/aliases
+++ b/aliases
@@ -17,3 +17,5 @@ alias rcstart="cfgfoo ${CFGFOOPATH}/steps/rc/start "
 alias rcreload="cfgfoo ${CFGFOOPATH}/steps/rc/reload "
 
 alias smtpdcheck="cfgfoo ${CFGFOOPATH}/steps/smtpd/check -s "
+
+alias users_obsd_add="cfgfoo ${CFGFOOPATH}/steps/users/obsd/add "
diff --git a/steps/users/obsd/add b/steps/users/obsd/add
new file mode 100644
index 0000000..d3bc194
--- /dev/null
+++ b/steps/users/obsd/add
@@ -0,0 +1,7 @@
+step_taken() {
+	userinfo "$1" > /dev/null
+}
+
+take_step() {
+	useradd -d "/home/$1" -m -e 0 -g =uid -L default -s /bin/ksh "$1"
+}