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

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

1 Answer 1

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.