Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Snow Leopard, I can give access to services like SSH only to specific users by using the "only these users:" option in the sharing tab of the System preferences.

This is bothersome to use when configuring multiple machines, and some accounts such as the root user do not show up there, so I'd like to script it.

Is there a way to add access to given services to arbitrary users on the command line?

share|improve this question

Create a group named "", and add users and/or subgroups to it. Here's an example of limiting SSH access to administrators (members of the "admin" group) and a user named "fred":

sudo dseditgroup -o create -r "Remote Login ACL"
sudo dseditgroup -o edit -t group -a admin
sudo dseditgroup -o edit -t user -a fred
share|improve this answer

Your Answer


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.