createAccount -home, not creating home in desired location

jhalvorson
Valued Contributor

I would like to create an admin account and to set the home to be in /private/var.

The following is not creating the folder /private/var/test01 nor is the home folder set to that location.

#!/bin/bash
admin1_long="test01"
admin1_short="test01"
admin1_passwd="setpwd"

# now create account

/usr/sbin/jamf createAccount -username "$admin1_short" -realname "$admin1_long" -password "$admin1_passwd" –home /private/var/$admin1_short –shell “/bin/bash” -admin

exit 0

We are using CasperSuite/JAMF version 8.43. It is failing to work on systems with 10.6 or 10.7.

4 REPLIES 4

golbiga
Contributor III
Contributor III

-hiddenUser flag will hide the account and the home will be set to /private/var/. You don't even need to use the -home flag.

Also keep in mind -password will send the password in clear txt in /var/log/secure.log

Allen

jhalvorson
Valued Contributor

I would like to have an admin account that is not hidden, ie an ID above 500. That is one of the requirements for being able to unlock a FileVault 2 encrypted hard drive.

But I would still like to have the admin account home folder out of site for our end users, hence the reason for including -home

golbiga
Contributor III
Contributor III

I just ran the command from terminal:

sudo jamf createAccount -username "admin" -realname "Admin" -password "password" -home "/private/var/admin" -admin

It created the account and created the home folder in /private/var

Allen

rtrouton
Release Candidate Programs Tester

Allen and I did some work on hiding a FileVault 2-enabled user from this OS (Allen did most of the work.) The method is posted here:

http://derflounder.wordpress.com/2012/02/22/hiding-an-filevault-2-enabled-admin-user-with-casper/