Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Creating user home directories in OS X Server OS X Server
I'm setting up a Web Server with OS X Server (10.2), and have been having problems with creating users with directories accessible from FTP. In the provided Workgroup Manager, you can set the home directory of a new user but nothing is created initially. Instead, it waits for the user to log in through AFP before creating it, which for a web server, is not exactly convenient.

Fortunately, Apple thought of this problem ... after several days of researching various materials, I found that you can run a program called "createhomedir" in Terminal and all the home directories will be created for you. Here's the steps I took:
  1. Open Workgroup Manager and go to the Users section
  2. Create a new user
  3. Click on the "Home" tab, and select the "local" radio button
  4. Click save, then launch Terminal
  5. In Terminal, type "sudo createhomedir --a"
That's it, you're done! There are some other options for creating home directories, just type "man createhomedir" to find out what each does.
    •    
  • Currently 2.86 / 5
  You rated: 4 / 5 (7 votes cast)
 
[13,787 views]  

Creating user home directories in OS X Server | 7 comments | Create New Account
Click here to return to the 'Creating user home directories in OS X Server' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
flag
Authored by: seika7 on Dec 06, '02 01:15:28PM

Are those 2 hyphens before the \'a\' flag in the command \"sudo createhomedir --a\"?

Please excuse my newbie question, but when I read manpages I sometimes see single hyphens and sometimes there are 2 hyphens in a row or a long one like an em dash.

Thanks,

Bryan



[ Reply to This | # ]
flag
Authored by: shurakai on Dec 06, '02 03:01:13PM

Yes, there are two hyphens. I tried 1 hyphen, but it did not work correctly.



[ Reply to This | # ]
client vs. server
Authored by: uurf on Dec 07, '02 09:05:54AM
This isn't on OS X Client, but I checked on my box that had undergone the "Server 10.2.2" update (via the whole version file mess a while back) and sure enough, it's there. However, if you've moved your Users directory,
[Machine-Name:~] username% createhomedir
won't work, uf.

[ Reply to This | # ]
Server Version
Authored by: shurakai on Dec 09, '02 03:25:13AM

This hint was done in 10.2.2, there may be issues with other versions of server

Peace,
Shurakai



[ Reply to This | # ]
Existing Directories
Authored by: Anonymous on Dec 09, '02 07:10:50AM

How does this command handle existing home directories? Does it simply irngnore them if they already exist, or does it overwrite existing files with the ones from the UserTemplate?



[ Reply to This | # ]
Existing Directories
Authored by: shurakai on Dec 10, '02 06:10:11PM
it does not overwrite existing home directories. I do not believe there is a way to overwrite previously created directories with this command, the only options are the following:

A list of flags and their descriptions:

-a: creates home directories for users defined in all directory domains of the servers search path.
-l: creates home directories for users defined in the local directory domain.
-n directoryDomainName: creates home directories for users defined in a specific directory domain in the servers search path.
-u username: creates a home directory for a specific user defined in the domain(s) identified in the -a, -l, or -n parameter. If you omit the -a, -l, and -n parameters when you use the -u parameter, -a is assumed.

[ Reply to This | # ]
AppleScript
Authored by: sixthring on Jan 15, '03 02:08:36PM

Does anyone know how to make an applescript that will do this?



[ Reply to This | # ]