Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I'm dealing with my company's Mac Mini (with loads of data I cannot risk on an external drive, but cannot plug out because of below) running Mac OS X Server 10.6.4.

My problem was that I needed to share a local folder with a client (giving him write permission). And my idea was that I could create a local account with very strict permissions.

Having found the option to change the home directory (system preferences > accounts > right-click > advanced) my thinking was that this would make the account unable to access anything but this directory (which may very well be wrong I now see).

Thus I changed the home directory to the directory I actually wanted to share (which is on this crucial external drive), which worked almost accordingly when logging in to the mac mini remotely (another shared folder was available as well).

But since the change claimed to require a reboot I rebooted the mini. Now I realized the account I had just created was no longer available under System Preferences > Accounts. It's still possible to access the mini using the accounts details remotely, but not when trying to log in on the actual mini itself.

What I find puzzling is that the account neither exists under:

$ /Users/

nor:

$ /path_to_external_drive/dir_i_chose_as_home/

However, when entering the Server Admin and assigning File Sharing permissions, I can see the new account in the users list when clicking add (the + sign) to assign permissions.

Now I could just leave this account there but this feels highly irresponsible.

I do understand it was very ignorant of me, changing the home directory without understanding it's implications. You are welcome to comment on whether or not this whole idea actually was unfeasible and unsafe but I would highly, highly appreciate if you could help me safely get rid of this newly created account (which essentially is my question).

How do I remove an account I can no longer see via System Preferences > Accounts (because I have changed its home directory)?

Thank you in advance

share|improve this question
    
What do you mean by "risk on an external drive"? –  Daniel Lawson Nov 9 '11 at 0:14
    
The home folder was on an external drive, and this external drive held data I could not risk (but of course could backup). However the problem was solved, please see my comment on the accepted answer. –  chris Nov 9 '11 at 8:01
add comment

1 Answer 1

up vote 1 down vote accepted

Open up terminal and try:

$ dscl . -list /groups GroupMembership

You should get a list of users along with which group they belong to. You should look for user/admin accounts including the one you recently made; This command will show you all users with the recently created one most likely near the bottom:

$ dscl . list /users

To get information about a user:

$ dscl . read /users/foo

Which will verbosely spit out all of the basic information, yielding this information near the bottom:

NFSHomeDirectory: /Users/foo

if you want to delete a user:

$ sudo dscl . delete /users/foo

asta la bye-bye! from there you can decide whether or not to delete ex-users directory.

share|improve this answer
    
Also - do fire up the server admin tools and see if you need to clean the offending user from the Directory Services. To be safe, you could also add that user again (same short name) and delete it using the system preference pane for local accounts. Good Luck! –  bmike Oct 11 '11 at 21:29
    
I will try those commands on Friday to learn whether or not I could have done it that way. Thanks @ioi. –  chris Oct 12 '11 at 9:44
    
@bmike Just before going home I realized I could delete the users using the server admin tools (sorry I didn't realize that at once), however my only worry was the one you just answered by saying I could create the user again normally and then delete him/her. Thank you. –  chris Oct 12 '11 at 9:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.