Skip to main content
Question

Command Line Create Home Folder Structure for User in Catalina.

  • August 24, 2020
  • 3 replies
  • 99 views

Forum|alt.badge.img+1

[Remote MacOS Catalina machine accessed via SSH]

Hi, I've created a new user via the command line (SSH), and though the new user is able to log in, the user's home directory has no pre-defined folders (as is the case for users added via the GUI).

So, I've tried using sudo /usr/sbin/createhomedir -c -u UserName but that didn't do anything.

Can someone please help me with the right command to do this? Thanks.

3 replies

sdagley
Forum|alt.badge.img+25
  • Jamf Heroes
  • August 24, 2020

@nap How did you create the user account? sysadminctl is the preferred tool these days (unless you're dealing with something older than Sierra), or you could use the createAccount option with the jamf binary.


Forum|alt.badge.img+5
  • Contributor
  • July 11, 2024

Hi, this is the command i used.

sudo sysadminctl -addUser admin -fullName "Admin" -password password -home /Users/admin -shell /bin/zsh -admin


Forum|alt.badge.img+5
  • Contributor
  • July 11, 2024

Hi, I used the following:

sudo sysadminctl -addUser admin -fullName "Admin" -password password -home /Users/admin -shell /bin/zsh -admin