2
votes
1answer
51 views

Adding a username alias using the command line

How do I add a username alias using the command line? I can do it fine using the preferences dialog through the "Advanced Options", but I need to do it during an installation script. Can someone ...
5
votes
2answers
244 views

Understanding the 'staff' user group

It's known that all users are members of the 'staff' group. If you setup a standard user and create any file, a list of that file in the terminal with 'ls -la' shows the user group to be 'staff'. ...
0
votes
2answers
49 views

“newgrp: too many groups” - why is it complaining?

In my earlier question, I got a response recommending the "newgrp" command. It diligently did the job of putting my desired group at the "top of the list" for the "id" command, but, why does it also ...
0
votes
1answer
46 views

Command Line - How do I change the order of a user's group memberships?

I have a troublesome Mac OS X server to deal with. When I ask for my current group membership using this: $ groups | perl -p -e 's/ /\n/g' I get a list of 20+ groups! cactuar ...
2
votes
1answer
403 views

Fixing two user groups with the same ID

Suddenly, my home directory is in the group messagebus instead of the usual staff.(I blame texlive for this, but have no evidence.) The problem is that both groups have the same ID: $ dscl . -read ...
9
votes
3answers
16k views

What steps are needed to create a new user from the command line on Mountain Lion?

What commands (or script) can create a fully functional user account on Mountain Lion, running only from the command line via terminal or ssh. It looks like an existing pair of answers might work, ...
0
votes
2answers
444 views

adding a secondary group for user via CLI in Lion is not working

I need to assign a secondary group membership to a user on a client machine running 10.7.4. In CLI edit3:~ admin$ sudo su - edit3:etc root# dseditgroup -o edit -a userA -t user QC edit3:etc root# ...
0
votes
0answers
2k views

How to remove group membership from user using the Lion Terminal?

How to remove a self created daemon user named '_denyhosts' from group 1025(workgroup), 403(com.apple.sharepoint.group.2), 404(com.apple.sharepoint.group.3) and 405(com.apple.sharepoint.group.4) using ...
6
votes
3answers
9k views

How to add user to a group on command line?

With Linux/Unix, I can use useradd -G developers vivek to add vivek to the developer group. How can I do the same thing with Mac OS X? Then, how do I check if vivek is in developers group?
8
votes
2answers
1k views

Can user accounts be managed via the command line?

Is there any way to add, remove, or modify user accounts via the command line? I'm not talking about an account for a system process or daemon, I mean is there any way to add a user account, change, ...