Can I add a user group to another group in Ubuntu?
Solution 1
You have to add each user to the group CanView
. You can't add a group to the group CanView
.
But you could use ACL.
Solution 2
You can "add" them, but first you must read man adduser
, man group
and man vigr
. On my system, I have added myself to 14 groups. I am not giving you a do this;do that
style answer, because You must understand what you're doing before you do it, or learn how to recover from doing it wrong. I have tried both ways.
Once you've added them to the group
file, they must either logout/login
to apply the new group membership to the session, or use newgrp CanView
to spawn a single shell with the new group membership active..
Related videos on Youtube
Andiana
Updated on September 18, 2022Comments
-
Andiana over 1 year
I have file named
abc.txt
and 3 groups (Teacher
,Staff
andStudent
). I want to create a group nameCanView
, which allow Teachers and Students to view the fileabc.txt
. Can I addTeacher
andStudent
toCanView
?-
muru over 8 years"ask" or "add"?
-
Andiana over 8 yearsAdd, I fixed after your comment
-