Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [group]

All about Unix groups and access control.

1
vote
1answer
24 views

Debian/dpkg handle group id collision

In my network there is a special user group with the ID 101. Unfortunatelly, Debian wants to use the ID 101 for the group systemd-journal. Since it exists only locally, I assigned systemd-journal the ...
7
votes
2answers
176 views

different output for groups and groups USERNAME after adding a username to a group

I stumble across a weird behaviour today. After adding a user to a new group like so : # gpasswd -a test myuser then connecting to a new bash session, here are the result for groups and groups ...
1
vote
2answers
37 views

How can we add multiple users to a group by single command in Linux?

I have to use usermod -G groupname username everytime to add user to group. Isn't there any way to do it by single line like usermod -G groupname user1,user2,user3
6
votes
1answer
224 views

Added a new user on Ubuntu, set password not working?

I created a new user: $ sudo useradd -m Ari -p pass123 But when I went to login it said the password was incorrect, I know it's correct because I saved the command line log as a text file. Other ...
3
votes
1answer
47 views

logout/login not enough to update group membership

I just added myself to "docker" group on my workstation. I dutifully logged out and in again on my desktop environment but I'm still not on the group: mcon@cinderella:~$ id uid=1000(mcon) gid=1000(...
-1
votes
0answers
32 views

Compare groups two linux users belong to

If someone asks, does userA belong to the same groups as userB, is there an easy way to compare the group memberships of these users? If groups are small in size you can easily inspect, but if the ...
1
vote
2answers
45 views

Group ownership modification - pitfalls

I'm user user and my primary group is user. If I change my primary group to primary_group, all of the files owned by me are suddenly owned by primary_group. This was unexpected to me. If group user ...
0
votes
0answers
46 views

CIFS permission issues when mounting a NTFS partition

I'm attempting to mount an NTFS file share. sudo mount.cifs //address.fileshare.com/TestMount /home/me/TestMount -o username=MyUserName,domain=MyDomain,uid=MyUserName,file_mode=0777,dir_mode=0777, ...
3
votes
1answer
59 views

What is the signifance of the Primary Group of a user?

Why must a user in POSIX-compliance have a Primary Group? Why can't they just belong to groups?
0
votes
2answers
93 views

Which owner group does `ls -l` show?

When the file owner is part of several groups, how does ls -l decide which group to show? For example, on MacOS, I see drwx------+ 48 flow2k staff 1536 Feb 5 10:11 Documents drwxr-xr-x+...
1
vote
0answers
100 views

Unable to add user to a group due to sssd?

I'm working on Fedora 29 x86_64 fully patched. I'm trying to add my user to the dialout group so I can open the modem: $ ls -Al /dev/ttyUSB0 crw-rw----. 1 root dialout 188, 0 Feb 22 19:27 /dev/...
0
votes
0answers
20 views

How to empty the list of supplementary group IDs for a process?

When I create a child process, it inherits the supplementary gids of the parent. If the parent is a root, then the child has (0) as supplementary gid. This behavior is not desired. Is it possible to ...
0
votes
2answers
69 views

Unable to access group files even though user is part of the group

I am trying to access a directory test as user ayush. This directory is owned by user ayush and has group git The directory has permissions 0070, and group git, and ayush is a member of that group. ...
1
vote
1answer
45 views

Directory owned by a group that doesn't exist? [duplicate]

I'm witnessing a a directory which has for group owner "1002" ... However I do not have any group with such ID (verified with getent group | grep 1002 ). Even history | grep groupadd gave nothing. ...
1
vote
1answer
30 views

Mass Assign Users to Groups

I have 2 text files, users.txt with a list of 1000 users and groups.txt with a list of 50 groups. I want to run a command that adds 30 users to each group (ex: users 1-30 to group 1, users 31-60 to ...
0
votes
0answers
28 views

if the member of any group has only the execute permission will the be able to enter into the directory belongs to that group?

# mkdir -p /test/music # created this dir as a root # chmod g=x,o= /test # rwx--x--- # gpasswd -a x1 root # adding x1 user into the root group # su - x1 # login as x1 $ cd /test ...
2
votes
1answer
55 views

ID inheritance – Which IDs?

I'm learning UNIX file permissions / ID inheritance and would like to clarify something: I have this list of permissions, users, groups and files: -rwxr-xr-x userA A foo -rw-rwsr-x userB B bar ...
0
votes
1answer
78 views

Why does the primary group of my user show up in /etc/group?

I'm following a course about Linux and it states the following: "The primary group of a user is not mentioned in the /etc/group file." However, my primary user "timgeldof" actually does show up in ...
0
votes
0answers
31 views

Adding user to a group with correct permissions and access to directory still denied [duplicate]

I have a directory 'ad' with permissions: drwxrwx---, for devpro devpro I added devst to devpro group with: usermod -a -G devpro devst If I use id command for devst I get: devst If I use ...
0
votes
2answers
75 views

Folder group ownership permissions and problems

I have created a folder called /home/projects, to do this I had to use sudo mkdir /home/projects because it's inside the home folder. Initially the folder had these permissions: drwxr-xr-x 4 root ...
4
votes
1answer
298 views

Inconsistency between “getent group” and “getent group <groupname>” – why?

Question How is the following possible? $ getent group | grep docker $ getent group docker docker:x:600: Note that the first call doesn’t return anything while the second one does. grpck doesn’t ...
-1
votes
1answer
75 views

How to organize /home/ such that users don't see each other's content?

Up to know, I used a sandbox server for myself only, and websites were in subdirectories of /home/www/: drwxr-xr-x 5 root root 4096 Nov 30 14:45 www |--- drwxr-xr-x 3 www-data www-data 4096 Oct 14 ...
-1
votes
1answer
47 views

How to add existing user to an existing group in centos 7?

I'm trying to add an existing user called Jim, to the current group called hoho, that I've created. I've looked up the command, and this is all I got. useradd -g hoho Jim Then when I checked to ...
3
votes
1answer
340 views

Who are the users in the default groups [closed]

I am learning command line currently in ubuntu Linux and am using a tutorial video that has shown me how to add and delete groups. When I view the groups in /etc/group file after using the command cat ...
0
votes
1answer
49 views

Freshly installed Wireshark with enabled non-root listen users is not able to listen

I have Linux Mint 19 64-bit Cinnamon. I have just installed wireshark-gtk with: sudo apt-get install wireshark-gtk while installing I was asked this: Answering Yes as you can see, as I am the sole ...
0
votes
1answer
52 views

Silent failure adding user to group

As part of an environment setup script we have the following snippet which installs docker: if [ ! "$(docker -v)" ]; then infoMessage "Setting up Docker..." echo "Updating system packages.." ...
0
votes
1answer
2k views

RHEL 7.5 - How to remove user from a group?

usermod does not have an option to remove user from a group Usage: usermod [options] LOGIN Options: -c, --comment COMMENT new value of the GECOS field -d, --home HOME_DIR new ...
1
vote
0answers
35 views

Can a user reside in one group, but write from another? [duplicate]

We have group Apache and, let's say, "District" group. All our team members are part of "District" group. Apache user is part of "Apache" group, and does a lot of work on our server, creating and ...
0
votes
1answer
32 views

What is the difference between calling “id -G” and “id -G -r”?

I know the -r flag should print the real group the user is in. But since -G already prints all his groups, does this make a difference? What does id -gr xxxsome_user really print out? How can a user ...
0
votes
1answer
20 views

KDE SC 5.10.5 on Kubuntu 17.10 / After logging in, user has only primary group assigned

Some time ago (can't tell exactly when, but it's been one week at least), users logging into KDE on this system stopped being assigned membership to their supplementary groups. For example, user "...
1
vote
0answers
32 views

Unable to add user to a new group as default as the user has its name same as old group

I am using Red Hat Linux 6. Have a username 'nrajora' and a group name 'nrajora' as default in the system I created a new group 'super-group' which has all the required privileges. Now I am trying ...
0
votes
0answers
49 views

How to retrieve information of a user?

After running below commands, [root@u87 ~]# getent group somegroup somegroup:*:2441:someuser [root@u87 ~]# [root@u87 ~]# [root@u87 ~]# cat /etc/group | grep somegroup [root@u87 ~]# [root@u87 ~]# cat ...
0
votes
1answer
26 views

Unable to add entry in /etc/group

Ran below commands to create a group [root@u87 ~] # groupadd -g 2441 somegroup groupadd: group 'somegroup' already exists [root@u87 ~]# cat /etc/group | grep somegroup [root@u87 ~]# [root@u87 ~]# [...
1
vote
1answer
43 views

Where are supplemental groups coming from in /proc/pid/status, are they always inherited from a shell?

In /proc/pid/status we can see all the supplemental groups for the pid (My understanding is this is assuming it was forked from an interactive shell or the process did getgroups(2)) I want to know ...
0
votes
2answers
53 views

What is the case of “a process running with extra privileges process can draw upon”?

From https://unix.stackexchange.com/a/18290/674 The kernel view Conceptually, there are three sets of groups that a process is a member of. Each set is a subset of the following one. ...
1
vote
2answers
1k views

In `/etc/passwd`, can different usernames for the same user ID have different group IDs?

From The Linux Programming Interface, about /etc/passwd: It is possible (but unusual) to have more than one record in the password file with the same user ID, thus permitting multiple login ...
11
votes
3answers
1k views

Can a superuser process change the real user ID and group ID of a process, not matching those in the password file?

From APUE The real user ID and real group ID of a process identify who we really are. These two fields are taken from our entry in the password file when we log in. Normally, these values don’t ...
2
votes
1answer
36 views

Can't access folder with group permissions

It seems that I can't access a folder on which I put 777 group permissions, even though I am a member of the folder's group. Error detail : 10:57 ~ $ ls -l d---rwx--- 2 laurent www-data 4096 août ...
1
vote
1answer
368 views

Equivalent to NFS all_squash

I have an unusual requirement where I need to mount the same filesystem on a client multiple times, but each mount offering a different view of the underlying data, based on the group permissions of ...
0
votes
1answer
41 views

Why is there a different result when running as user1 and su - user1 -c “command”?

When running as user1 in the same directory (/home/user1/WWW) [user1@server1 WWW (master)]# touch c Creates the file c inside the directory. [root@server1 WWW (master) ACCEPTATIE SERVER]# su - ...
1
vote
1answer
493 views

What must be added to nsswitch.conf to show AD users and groups?

This is a follow-up to this question. I have a CentOS 7 machine which has joined a domain FOOBAR. It is possible to successfully get info about users stored in the AD via id user@FOOBAR.GLOBAL ...
1
vote
0answers
76 views

sudo does not recognize new group

Why won't sudo recognize my group, in a fresh login after using groupadd? Our DigitalOcean CentOS comes with a borked sudo implementation. It's the following script, note well line #2: $ nl $(which ...
0
votes
1answer
190 views

Permissions Error

I'm running Ubuntu 16.04.4 LTS and facing a problem. All of a sudden I'm unable to edit files that I could before, I cannot run programs due to permission errors. I'm always logged in as a user ejaz ...
4
votes
2answers
986 views

Missing groups at each startup

Logging out and logging back in do not fix this problem. Rebooting does not fix this problem. NOTE: Please do not mark this question as a duplicate, I'm aware of this question: I added a user to a ...
1
vote
1answer
657 views

Groups not registering in X

I'm using Ubuntu 16.04. When I use LightDM to login and start X, I see that my secondary groups aren't loaded (running "groups" reports that I belong only to my primary group). If I log in via ...
1
vote
2answers
180 views

What is the application of file ownership (chown) in linux?

I have faced a problem in changing the permissions for a specific group of users in my system. suppose I have four users u1,v1 and u2,v2 and two groups g1 and g2. u1,v1 are in g1 group and u2,v2 are ...
0
votes
2answers
1k views

How to add user to a group using bash scripting? [closed]

I am having hard time adding a user to a group in script. For example, I have a script that asks user to answer several questions, and if answers are correct, that user should be added to a certain ...
0
votes
2answers
42 views

User can delete file with read permission only

I created user small, added him to group kek and allowed that group to only read files in user home directory. Then I chowned all files to root:kek. However, small still can delete files in his home ...
1
vote
1answer
68 views

Why give mysql group the same GID as sudo group?

I'm following installation/setup instructions in the MySQL Secure Deployment Guide, which say to create the mysql group with: groupadd -g 27 -o -r mysql The -o permits adding a group with a non-...
0
votes
1answer
230 views

Need to split a file into multiple files, but ensure the grouped data remains in same file [duplicate]

This question is not a duplicate, because here we need also to ensure, that group of common values/rows remain in the same split file (and is not scattered across multiple split files). All, I tried ...