#!/bin/sh set -x rc=0; id -nG $USER | grep -qw "Domain Users" && rc=1 if [ "$rc" = "1" ]; then REAL_HOME=$(bash -c "echo ~$USER") if [ ! -e $HOME ]; then mkdir -p $HOME fi chown $USER:nogroup $HOME chmod o-rwx $HOME fi exit 0