Linux can you add a group to a group




















Learn more. Group within group file permissions Ask Question. Asked 9 years, 2 months ago. Active 4 years, 9 months ago. Viewed 44k times. I tried finding this on here, but couldn't so sorry if it's a duplicate. Say I have 2 groups and a user: group1, group2, user1 with the following structure: group1 is a member of group 2, user1 is a member of group1 Now say I have the following files with relevant permissions file1 root:group1 file2 root:group2 Now when I log into user1, I'm able to edit file1, but not edit file2.

I'm using Ubuntu btw. Improve this question. Gilles 'SO- stop being evil' k gold badges silver badges bronze badges. Aram Papazian Aram Papazian 1 1 gold badge 3 3 silver badges 7 7 bronze badges. If I'm not mistaken, the classic group-based permissions in Linux do not allow you to put a group inside another group. So did you installed something which enables this feature? You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features.

Registration is quick, simple and absolutely free. Join our community today! Note that registered members see fewer ads, and ContentLink is completely disabled once you log in. Are you new to LinuxQuestions.

If you need to reset your password, click here. Having a problem logging in? Please visit this page to clear all LQ-related cookies. Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.

Without using —append , the user could be dropped from other groups. Use the usermod command to specify multiple groups to add to:.

This is useful for creating a new user on the fly for a specific software application. Enter the following:. All previous commands have been used to manage the secondary groups a user belongs to. The lower-case —g specifies the primary group. Upper-case —G refers to a secondary group. The gpasswd tool is used for managing groups. To remove a user from a group:. Note: The gpasswd tool can also be used for other administrative tasks such as defining group administrators and setting a password for access to group resources.

Use the Linux man command man gpasswd for details. Linux comes with several different groups by default.

This output will also show you which user accounts are members of which groups. So, in the screenshot below, we can see that the user accounts syslog and chris are members of the adm group.

Browse All iPhone Articles Browse All Mac Articles Do I need one? Browse All Android Articles Browse All Smart Home Articles Customize the Taskbar in Windows Browse All Microsoft Office Articles What Is svchost.

Browse All Privacy and Security Articles Browse All Linux Articles Browse All Buying Guides. Best iPhone 13 Pro Case. Best Bluetooth Headphones for Switch. Best Roku TV. Best Apple Watch. Best iPad Cases. Best Portable Monitors. Best Gaming Keyboards.



0コメント

  • 1000 / 1000