#!/bin/bash #% add-user [--full] #% (Interactively) adds a user to LDAP. #% --full : grant full member privileges (add to itanic-shell, xmpp and vpn) . $LIB_DIR/common.sh function readvar() { vname=$1 prompt=${2:-$1} echo -n "$prompt: " read $vname } uid=$((`maxuid`+1)) readvar login "Login" readvar cn "Full name" readvar email "Email" raw-add-user $login "$cn" "$email" add-to-wiki $login create-posix-group $login $uid if [ "$1" = "--full" ]; then grant-member-privileges $login fi msg "After commiting, please issue welcome-email $login to activate the mailbox"