Import users and groups from a file in macOS Server
You can import users and groups from character-delimited text files, which is an easy way to quickly set up accounts.
You can Export users and groups to a file in macOS Server or use the
dsexport command-line tool to create character-delimited text files of accounts on your network server. For information about how to use
man dsexport in Terminal.
Passwords aren’t included in the export files generated by
dsexport, but you can edit the file to include them. Otherwise, you’ll need to assign passwords to users after importing.
In the sidebar of the Server app , select Users.
Click the More button and choose Import users, then select the file to import.
Select the directory domain from the Directory pop-up menu where you want the new users to reside.
If necessary, enter an administrator name and password for the file and select a user template.
You can also use the
dsimport command to import users from a file. Users imported from a file don’t have access to services until you grant them access. For information about granting users access to services, see Define service access by users in macOS Server.