I can't quite understand groups. For example, lets say if I add the following into my samba config:

valid users = @users

Must the group users exist on my system or is a samba group itself? And if the former, how can I create this group. via groupadd -r users?

After that, only those valid users in that group can browse files, right?

When I log in now as root to list all groups via groups, it just says root, nothing more, but I need to know all groups.

  • The root user is only in the root group because there is no need for anything else: all permissions are simply ignored by the system.
    – M Noit
    Aug 12, 2014 at 10:10

1 Answer 1

  1. The group users must exist in the system.
  2. You can create a newgroup with groupadd users. No need to use the -r option to create a system group. You can add user to the group using the command gpasswd -a username groupname
  3. groups command list the groups the current user is in. The full list of group is inside the configuration file /etc/group. Do not modify this file with a text editor: if you do some syntax error you may become unable to login.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .