All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
1answer
24 views

Primary and secondary group of a user

Why is it that group1 which should be user's primary group, is in the subgroups? The user is not even part of group1 in /etc/group file. # id user uid=1000(user) gid=1111(group1) groups=1111(group1),...
4
votes
2answers
47 views

list files with specific group and user name

Do you know a command to list all files on the server with specific group and user name? I am looking for something like this: find -ls -group 'groupname' && find -ls -user 'username' this ...
7
votes
2answers
227 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
66 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
284 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 ...
4
votes
1answer
75 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
166 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
31 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 ...
2
votes
1answer
59 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
0answers
32 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
338 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 ...
-1
votes
1answer
64 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 ...
0
votes
1answer
3k 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
0answers
57 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
31 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
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
48 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
788 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 ...
7
votes
2answers
1k 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
2answers
237 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
2k 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
65 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 ...
0
votes
0answers
19 views

Change permissions for a group that is not the owner of the file

I am part of a group called friends and we have a directory titled secrets. I have a rwx permissions, friends have rx permissions and others have w permissions. I want to explicitly ban members of a ...
2
votes
2answers
71 views

Why can't regular users create and manage user groups?

I've been wondering if there is a good reason why a regular user can't create their own group. It would make sense for the file owner to be able to set up a group and manage file permissions. For ...
1
vote
3answers
49 views

linux + how to verify user is in group? [duplicate]

how to verify that new user was added to group? example by this syntax I will add the user dog to group - white_house_group usermod -a -G white_house_group dog after that , how to verify that ...
3
votes
1answer
14k views

sudo access vs wheel group

I am just a little bit confused here. When you are asked to give a user sudo access to the machine. Should I just add the user to the wheel group. # usermod -aG wheel bob Or let's say there is no ...
1
vote
2answers
60 views

The user `ldl` is exists in the root group, but when I use `groups root` check it, do not shows the `ldl` user

The user ldl is exists in the root group, but when I use groups root check it, do not shows the ldl user. [root@localhost Qiyun02]# usermod -g root ldl [root@localhost Qiyun02]# groups root root : ...
1
vote
1answer
2k views

Will the primary group of a user be deleted when you delete the user?

I have created a user called paul using the following command: sudo adduser paul adduser also created a new group called paul and made it the primary group for the user paul. I have created a file ...
1
vote
1answer
45 views

Files permission - problem with an exception to grant to specific user

As part of an exercice at my University, we need to do the following task: Respect the «least Privileges» rule. Create 5 users groups, each one has its own folder (G1 => Folder_G1) Grant user ...
1
vote
1answer
3k views

Unable to add myself to the docker group [closed]

I confirmed that the docker group exists $ grep -i docker /etc/group docker:x:130: but when i tried usermod -aG docker, I got the usage output $ sudo usermod -aG docker Usage: usermod [options] ...
1
vote
1answer
76 views

Prevent users from changing group of their own files

I'm writing a set of scripts to provision game servers. I have each game server being installed as a separate user, so that they're all isolated and can't access each other's files. The daemon/...
1
vote
3answers
65 views

how to verify users are in group

we add the following user to the group white_house kuku , trump , karter usermod -a -G white_house kuku usermod -a -G white_house trump usermod -a -G white_house karter as all know we can verify ...
1
vote
1answer
30 views

How to apply usergroup changes without having to end session / logging out / closing programs?

I'd like to remove myself from usergroups via deluser username group-to-get-removed-from without having to log out and back in as most programs get closed when doing so. Is there a way to apply ...
0
votes
0answers
1k views

Mounting NFS on AIX so that files are not owned by nobody:nobody

How can I mount an NFS share on AIX? The share was created on a Windows server 2012, I created the NFS role as a server and client as well. I set the properties on the Windows server to share the ...
4
votes
2answers
983 views

How to give to a user ability like root with visudo? [duplicate]

I add this line to visudo, in order to give full permissions to yael user: yael ALL=(ALL) NOPASSWD: ALL But when I want to update the /etc/hosts file, I get permission denied: su – yael echo "...
3
votes
2answers
742 views

Can group name of a user and the username of some other user be the same?

Let's say the group name of user1 is xyz. Is it possible, in the same Linux machine, that the username of some other user (not user1) is xyz?
1
vote
0answers
29 views

Use ACL to harmonize permissions inside one folder

Me and a few of my friends can log on my server as, say: user vser wser ... They all have their private /home/user, but we wish to share another /home/fiesta folder, with anyone being able to do ...
0
votes
1answer
2k views

Count number of users in groups

There are file /etc/group. The format is "group name:password:identifier:list of users separated with spaces" How to print NAME of group with biggest number of users? Thanks.
2
votes
2answers
5k views

Can't add user to group without a restart?

I'm trying to add a user to a group wireshark as explained here. I have already executed multiple different commands and was under the impression that the user was successfully added. ~$ sudo ...
0
votes
3answers
516 views

echo users with a specific gid

I am supposed to write a shell script that will echo usernames of users whose primary group is equal to the group whose id is the argument of command line.
0
votes
2answers
65 views

Automatically allow user1 in group1 to edit file with owner user2 and group user2 [duplicate]

I am confused with groups in Linux. Considering that user1 is in both groups user1 and user2 (and vice versa): user1> id user1 uid=1000(user1) gid=1000(user1) groups=1000(user1),4(adm),24(cdrom),...
1
vote
0answers
450 views

Adding an LDAP user to a local group

My host running Ubuntu 16.04 is also an LDAP client. The LDAP database contains some users like ldapuser who are able to log in the host. ldapuser can join a local group like sudo, sambashare, etc., ...
4
votes
1answer
133 views

`id` prints only numbers for non-root users

When I use the id command, it does not resolve to user- and group names (for admin it works): User backup and admin: backup: # id uid=1005 gid=100 groups=100 admin: # id uid=0(admin) gid=0(...
1
vote
2answers
738 views

How group name works on creation of any file?

If I create any new file/directory/link, sham@mohet01-ubuntu:~$ ls -l total 48 drwxr-xr-x 3 sham sham 4096 Apr 5 19:03 Desktop drwxrwxr-x 2 sham sham 4096 Apr 7 11:19 docs drwxr-xr-x 3 sham sham ...
1
vote
1answer
667 views

How to delete user from all secondary groups in FreeBSD?

According to pw usermod documentation: -G grouplist Set secondary group memberships for an account. grouplist is a comma, space, or tab-separated list of group names or ...
1
vote
2answers
967 views

What are JDK default user and group?

I have a freshly installed jdk1.8.0_121 on my redhat machine. When I ls -la in the installation directory, following output is received, total 178952 drwxr-xr-x. 5 root root 87 ...
2
votes
2answers
582 views

How do I display the owner, groups and permissions for a user in bash?

Is there a specific command that will display the owner, group, and permissions for a user or will I need to run more than one command? I just created the user "guest" in the /home/ directory and ...
0
votes
2answers
362 views

Is that redundant for groups=0(root) listed in id command output?

sudo id uid=0(root) gid=0(root) groups=0(root) Maybe it is redundant for groups=0(root) listed here, gid=0(root) can express the meaning of group root's id is 0?