Questions tagged [group]
All about Unix groups and access control.
606
questions
7
votes
2
answers
1k
views
What system calls create users and groups?
Whenever I search for how to create groups, examples always point to chapter 8 (i.e. shell) commands. When I look through lists of common sys calls (i.e. the ones listed in the Wikipedia page), I see ...
0
votes
0
answers
23
views
Implementation of groups in the linux kernel
Question:
Are there any further sources to catch up on the implementation of groups in the linux kernel.
The man page about credentials helped me out so far, but I like to delve deeper (though still ...
1
vote
1
answer
27
views
Allow user in group to access shared folder from another user
There are two accounts user1 and user2. I wish to share and give rwx access to my user1 /home/user1/Documents/ folder with user2. To do this, I have made a new group called sharedDocs. These are the ...
0
votes
1
answer
56
views
How do I switch users with their groups groups in Python?
How do I switch to an admin-user account from this python script named root_and_user.py that was run with doas or sudo?
#!/usr/bin/env python3
from os import geteuid, seteuid
from subprocess import ...
0
votes
2
answers
76
views
member of www-data but it doesn't show in groups
When I look at the groups that user 'wim' is a member of, www-data group does not show.
When I look at the members of www-data, user wim is listed.
$ groups
wim adm cdrom sudo dip plugdev lpadmin ...
0
votes
0
answers
23
views
Postfix - configuration of blocking distribution groups
I'm new to the forum, so I apologize in advance for any mistakes in the post.
As in the topic, I have been administering a postfix-based mail server for a long time.
Basic configuration. Distribution ...
0
votes
0
answers
22
views
Share everything between the home directory of two accounts [duplicate]
I have two accounts on my Kubuntu distribution, say A and B, and I want that all folders and files that user A creates in its home directory be accessible and modifiable to user B and vice versa. I ...
0
votes
4
answers
79
views
output a column group by another columns in shell
Thanks in advance!
I have a file with 3 columns like this:
serv1 red group1
serv1 black group1
serv1 orange group1
serv1 red group2
serv1 orange group2
serv1 red group3
...
0
votes
1
answer
62
views
Does Linux have well-known groups and users, other than root? [duplicate]
Windows have lots of well-known groups and users that all installations have by default. For example, the Administrator user is a member of the Administrators group, or any user is a member of the ...
2
votes
1
answer
102
views
How do I enable unprivileged_userns_clone selectively for one executable or user?
How do I enable CLONE_NEWUSER in a more fine-grained fashion compared to just kernel.unprivileged_userns_clone?
I want to keep kernel API attack surface manageable by keeping new and complicated ...
0
votes
1
answer
512
views
Does chown command allow to set group different from user group?
It may be a stupid question, but I don't understand a detail about the command chown. I haven't found any explanation for this detail yet, maybe because it's so obvious to everyone.
When you change a ...
1
vote
0
answers
38
views
Is there a group reference in grep's Regex? [duplicate]
s="/usr/share/fonts/X11/100dpi/ncenI12-ISO8859-1.pcf.gz: New Century Schoolbook:style=Itali"
The best way to extract three parts seperated by ":" is to use awk:
echo $s | awk -F: '...
0
votes
1
answer
27
views
change group ownership specifying from to for entire file system
I have 3 specific user accounts (less than 10 anyway), for all files & folders under a specific /data or /home directory, I want to change just the group ownership of all occurring files/folders ...
0
votes
1
answer
49
views
How do I have two group owners
I have a file where I want there to be not one but two groups who can have extra privileges to access it. But when I chown or chgrp it to a group it always erases the previous group. How do I add a ...
0
votes
0
answers
18
views
What is the best practice of managing files of service users (which are different from the admin / logged on user)?
I know that services shouldn't be run as root, and most applications already define their own users upon installation (e.g., FreeSWITCH creates a freeswitch user, and systemd starts the service as so)....
0
votes
2
answers
42
views
Why is `id` giving different answers for basically the same question
I'm on Ubuntu.
$ whoami
eugen
$ id
uid=1000(eugen) gid=1000(eugen) groups=1000(eugen),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),122(lpadmin),134(lxd),135(sambashare)
$ id eugen
uid=1000(eugen) gid=...
2
votes
0
answers
18
views
How to grant group access to a singularity instance
I constructed a singularity/apptainer sif container and I can now start an instance of this container. Is there a way to grant other users (in a group) the right to run the instance ?
In short, How ...
1
vote
1
answer
136
views
Ext4 "unused inodes" "free inodes" diffrence?
When I use the dumpe2fs command to look at the Block Group of the ext4 filesystem, I see "free inodes" and "unused inodes".
I want to know the difference between them ?
Why do they ...
4
votes
1
answer
401
views
Put a specific file in every Unix user's home directory when they're created and added to a particular group
How can I set up my Solaris system so that every time a user is created and assigned to a specific group, a specific file is placed in that user's home directory?
0
votes
1
answer
56
views
Where to find purpose of each system default Groups and Users in Linux
when I cat /etc/group and cat /etc/passwd I get a list in which I find many I don't know. I know only group sudo group. But there is are many which I don't knows such as sys, adm .... I like to learn ...
0
votes
2
answers
211
views
adding a user to an existing group in linux
I am wondering if there is a difference between using usermod or groupmod to add a user to another existing group.
Example: we have a supplementary group named artists and want to add romeo to this ...
1
vote
1
answer
895
views
How to get list of users with a given group as primary group
With
getent group xyz
I get a list of users who are members of xyz with xyz either as a primary group or as secondary group.
How do I get a list of just those users who have xyz as their primary ...
0
votes
1
answer
302
views
Group not listed in groups command
On Ubuntu 22.04, I've installed docker, added myself to the docker group with sudo usermod -a -G docker user, and logged out/in.
However, I still get "permission denied" errors when running ...
0
votes
0
answers
26
views
convention of group id for audit
in /etc/audit/auditd.conf there is log_group = root. I have been asks to change that to log_group = audit to facilitate logging.
In RHEL 7.9 there is no audit group defined in /etc/group; someone ...
0
votes
1
answer
168
views
What are the differences between lgroupadd and groupadd?
lgroupadd is provided by libuser.
groupadd is provided by shadow.
Both create user groups.
I couldn't find the difference between the two on google.
0
votes
0
answers
21
views
Why is logging back in necessary after adding user to docker group? [duplicate]
In the Docker documentation, discussing how to give a non-root user permission to use Docker, it instructs, after adding the user to the docker group,
Log out and log back in so that your group ...
0
votes
1
answer
48
views
How to set up up group specific folders in linux
I'm trying to create a segregated workspace for multiple groups, each group member should only be able to read, write and view their associated shared folder.
I've created 2 user groups groupATeam ...
0
votes
1
answer
62
views
How to limit messages from the wall command to a specific group?
The description for the wall command states that it sends a message to all logged in users. However, the man page describes a flag, -g --group, which allows the sender to limit messages to a specified ...
1
vote
0
answers
191
views
group symlink access denied
I have a symlinked directory that I cannot access. The other user has created a folder in their home directory and created a symlink to it in a place I can access, but I get 'permission denied'. I ...
0
votes
1
answer
120
views
When a user group is created, are there any group names that should be avoided?
There are many group names in /etc/group on a freshly installed Linux distribution. When creating a new group, are there any group names that should be avoided, outside of ones that already exist in /...
2
votes
2
answers
285
views
Is there a similar command like "lid" on Ubuntu?
On RHEL, there is a command lid, which lists group users, no matter primary group or secondary group.
[root@192 ~]# id user1
uid=1000(user1) gid=1000(user1) groups=1000(user1),1001(g1)
[root@192 ~]# ...
0
votes
0
answers
259
views
PAM allow only a specific su command for a user
i created a rule to allow mygroup group to do su command. In /etc/pam.d/su
auth sufficient pam_succeed_if.so use_uid user ingroup mygroup
Now i want mygroup to be able to use only halt command, ...
1
vote
0
answers
333
views
Add user from LDAP db to local linux group
My user to login to RHEL server is: e5614
I do not see that user in /etc/passwd.
But I do see it with getent command
getent passwd | grep e5614
e5614:x:613869764:10104:JohnJohn:/home/e5614:/bin/bash
...
0
votes
2
answers
340
views
How to pick a static group id?
I am tasked with reassigning a static group id (gid) to an existing group name that exists on multiple Linux servers.
E.g. the group name foo currently exists on multiple servers, but with different ...
1
vote
1
answer
73
views
In what context can I see effect of sudo's "--preserve-groups" option?
Given the following users:
$ whoami
admin
$ groups
staff everyone admin groupA
and
$ whoami
user
$ groups
staff everyone groupB
I'm trying to understand what exactly the --preserve-groups option ...
0
votes
0
answers
26
views
How can I allow multiple users or groups the w+x access to a certain directory? [duplicate]
I'm aware of how to change the owner or group of a directory. However, I want to know that how I can allow multiple groups or users to have w+x access to a certain directory without chaning the actual ...
8
votes
3
answers
722
views
Is there a tool that could allow the users of our scientific computer to book it exclusively?
We have one beefy ubuntu rig for our research department that can do heavy lifting with its CPUs and GPUs. All of our researchers SSH into the machine and run (machine learning) workloads on the ...
1
vote
1
answer
185
views
Can deleted groups still function through primary groups in Linux?
With an analyzing program I built, I ran into a bug where a user had a primary group set to a since then deleted group (no longer in the /etc/group file). To scope the impact I ran some tests and run ...
-1
votes
1
answer
521
views
useradd: group '9001' does not exist
i am trying to run the command:
root@minimanode:/# sudo wget -O minima_setup.sh https://raw.githubusercontent.com/minima-global/Minima/master/scripts/minima_setup.sh && chmod +x minima_setup....
1
vote
1
answer
797
views
Grub-customizer trying to use `KDE su` - Cannot login
I would like to use Grub Customizer, but I cannot start it. After entering the administrator password,
it asks again for it:
(see update below: I guess the first image shows an interface that is not ...
1
vote
1
answer
2k
views
How to enable sudo privileges for user group to apt-get install anything
I want to give a group permission to install software without needing to input a root/sudo password. I'm on Linux Mint 20.3 Cinnamon.
I have created a group called "basicsudo".
I first typed
...
5
votes
2
answers
869
views
Copying a file into a directory where I am a member of the directory group
I am attempting to copy a file into a directory where my user account is not the directory owner but belongs to a group that is the directory group owner. These are the steps I have taken:
Create a ...
0
votes
1
answer
301
views
Is there a default GID for wheel group on Debian Linices?
I know Debian doesn't use the wheel group by default, but I'm to the bottom of my todo list for securing some old operating systems that I don't want to rebuild from scratch and running the CIS ...
7
votes
1
answer
756
views
With sudo, is it possible to execute a program using a target group which the target user is not in?
Please consider a Linux system with a standard installation and configuration of sudo; that is, root can execute all commands, taking the identity of other users, and please consider the following ...
0
votes
0
answers
38
views
Why am i able to access a folder which technically shouldn't allow me in?
I found a folder whose ls -ld output goes like this
drwxr-x--- 14 root somegroup 12K Jan 13 20:10 somefolder
I dont belong to the group somegroup as found from the groups command. Rules say that i ...
0
votes
1
answer
657
views
Is there any file/directory permission effect if change uid or gid on Linux?
If group and user's settings are
group name: group1
gid: 2000
user name: user1
uid: 2000
Some directory's permission is
Directory: /application
Owner: user1
Group: group1
When change the gid and ...
0
votes
0
answers
3k
views
How to fix "cannot find name for group ID xxx"
I have read Linux: id: cannot find name for group ID 999 but that does not answer my problem. The following is what I got (the username ABC and group name NAMEX are fictitious, I did adduser NAMEX, ...
0
votes
1
answer
27
views
Have a folder have many group based permissions
On a multi-user system, lets say I have the following groups:
"writers"
"readers"
"reviewers"
In the folder /Documents
writers should be able to write files, but not ...
0
votes
1
answer
382
views
local user on samba server machine using it's primary group even though force group is used
So I'm trying to set up a password protected samba share with permissions. And I believe I have set everything up decently correctly and the samba share works as intended.
But I'm having a slight ...
0
votes
1
answer
2k
views
How to avoid getting "sudo: Account or password is expired, reset your password and try again"
I am trying to add user e.g. amit to group amit,as below.
root# groupadd -g 1500 -f amit
root# useradd amit -m -G sudo -u 1500 -g 1500 -o -p "amit"
However, ...