Local Passwordless Account

Morningside
Contributor II

Managing the Guest User Account is such a royal pain in the neck that I have decided to create my own Pseudo-Guest account and manage it with logout scripts etc. However, the Local Account policy in Jamf Pro requires a password. What is the best way to accomplish this?

1 ACCEPTED SOLUTION

anverhousseini
Contributor II

Jamf binary is your friend:

#!/bin/bash

/usr/local/bin/jamf createAccount 
  -username "username" 
  -realname "realname" 
  -password "" 
  -home "/Users/username" 
  -suppressSetupAssistant

View solution in original post

3 REPLIES 3

anverhousseini
Contributor II

Jamf binary is your friend:

#!/bin/bash

/usr/local/bin/jamf createAccount 
  -username "username" 
  -realname "realname" 
  -password "" 
  -home "/Users/username" 
  -suppressSetupAssistant

Morningside
Contributor II

Wonderful!

mm2270
Legendary Contributor III

FWIW, sysadminctl can also do this. Essentially any tool that can create a new user from the command line should allow for it.

sudo sysadminctl -addUser "username" -fullName "Full Name" -uid <UID> -shell /bin/bash -home /Users/username

Using the above, the home itself is not created, just assigned as a path. You'll either need to include some code to copy over the User Template into a new home, or you can just allow the OS to do it on the first login of the account.
In fact, if this is for your pseudo guest account you posted on another thread, you might as well just delete the account on logout using a logout script/policy and then recreate the account each time. That would be the closest approximation of the actual OS guest account.

Edit: Meant to say above, delete the user home on each logout, not the user itself from directory services.