Create Hidden User in 10.5

Here is a script that creates a hidden user account in 10.5 for local administration of a client machine. #!/bin/sh#create a hidden admin account#please fill in the desired user name and password after the = below with no space#short names do not support spacesUSERNAME=PASSWORD=#using dscl we will create a new user/bin/echo "creating admin user account…"/usr/bin/dscl . create /Users/$USERNAME/usr/bin/dscl . create /Users/$USERNAME PrimaryGroupID 0/usr/bin/dscl . create /Users/$USERNAME UniqueID 444/usr/bin/dscl . create /Users/$USERNAME UserShell /bin/bash/usr/bin/dscl . passwd /Users/$USERNAME $PASSWORD/usr/bin/dscl . append /Groups/admin GroupMembership $USERNAME/usr/bin/dscl . create /Users/$USERNAME NFSHomeDirectory /var/home/$USERNAME/bin/echo "creating new admin account homedir…"/bin/mkdir -p /var/home/$USERNAME/usr/bin/ditto -rsrc -V /System/Library/User\ Template/English.lproj/ /var/home/$USERNAME//usr/sbin/chown -Rf $USERNAME:admin /var/home/$USERNAME/bin/echo "confirming what we just did…"/bin/ls /var/home/$USERNAME//usr/bin/id $USERNAME/bin/echo "if that looks good, we're all set."
No votes yet