Skip to content

Instantly share code, notes, and snippets.

View shravan-shandilya's full-sized avatar

Shravan Shandilya shravan-shandilya

View GitHub Profile
@shravan-shandilya
shravan-shandilya / create_user.sh
Created September 5, 2018 14:50 — forked from thimbl/script.sh
shell script to create user accounts
#!/bin/bash
ROOT_UID=0
SUCCESS=0
E_USEREXISTS=70
# Run as root, of course. (this might not be necessary, because we have to run the script somehow with root anyway)
if [ "$UID" -ne "$ROOT_UID" ]
then
echo "Must be root to run this script."
exit $E_NOTROOT