- Q. ''I deleted a user, but now I can't delete their old home directory ("username Deleted").''
- Q. ''How do I control what's in a new user's home directory?''
- Q. ''How do I change a user's short name?''
- Q. "Can I add a user to more groups?"
- Q. I want to give a file to another user. But when I put it in their drop-box folder, it still belongs to me, so they can't edit it. Can a drop-box be made to automatically change ownership of files it receives?
1 Q. ''I deleted a user, but now I can't delete their old home directory ("username Deleted").''
A. Delete it from the CommandLine:
[localhost:~] you$ sudo rm -rf "/Users/username Deleted"
2 Q. ''How do I control what's in a new user's home directory?''
A. When a user is created, the directories and files in /System/Library/UserTemplate/English.lproj/ are copied to the user's home directory, and the new user is set as the owner of everything in their own home directory. You can edit any of the files in the UserTemplate directory (for instance, changing index.html to give users a different default web site) or add/remove directories (for instance, removing the Music folder), but be careful with permissions. Any files or directories you create should be owned by "root", group "wheel", and the privileges should be the privileges you want when the files are copied and become owned by the new user. Only the owner and group are changed when the files are copied; the privileges are left alone.
3 Q. ''How do I change a user's short name?''
A. You can't. But you can fake it:
KBase 106824: Mac OS X: How to Change User Short Name
A. You can, actually. Don't try this at home, though; I've never tested this specific procedure. But it *should* work.
- Open "NetInfo Manager", navigate to /users, click on the user you'd like to change the short name of.
- You're going to want to change the values for "name", "_writers_picture", "_writers_passwd" (if present). Also update the value for "home" as desired.
- Close NetInfo Manager, save your changes. Open Terminal. Enter the following commands:
sudo ditto -v -rsrc /Users/(oldshortname) /Users/(newshortname)
- Logout. Login as the user. Delete the old home directory, once you've confirmed the ditto worked.
You should be set. Feedback welcome! -- coral@crystalflame.net
4 Q. "Can I add a user to more groups?"
A. Use NetInfo Manager. Navigate to the group you want to add the user to. For most groups you'd create, the 'users' property will be set to 'no value.' Use Directory -> Add Value and type the (short) name of the user you want to add. This can be repeated to add as many users to the group as you'd like. Save the netinfo database to have the changes take effect. It seems that Terminal windows need to be closed to pick up changes.
5 Q. I want to give a file to another user. But when I put it in their drop-box folder, it still belongs to me, so they can't edit it. Can a drop-box be made to automatically change ownership of files it receives?
A. I think the other user will have to duplicate the file (File menu, Duplicate) to get a copy that belongs to them. They should be able to delete yours though, since a user can delete any file in a directory they own (at least from the UNIX command line they can). The user can also see who created the original file in the drop-box, which is neat.
A2. In Mac OS X Server 10.2.x, Workgroup Manager will let you specify whether new files should be created with permissions that follow standard Unix rules (as described in the question) or inherit permissions from enclosing folder. I do no know if anything similar can be accomplished in 10.2.x client.
See also: LoginWindow, LoginItems, RootUser