All about Unix groups and access control.

learn more… | top users | synonyms

0
votes
1answer
49 views

How can I add all my groups to a different user in bash?

I've got a user named foo. I'd like foo to have all the same group memberships that I do. I thought I was close, with this: sudo usermod -a -G $(id -Gn | tr " " ",") node4 The id piped to tr is ...
0
votes
2answers
31 views

How to count how many files belong to each user/group combination?

How to count how many files belong to each user/group combination? I need to do this for each user/group combination that exists, in each of the directory trees /etc, /usr, and /var.
2
votes
4answers
88 views

Can a Linux user have multiple primary user groups?

How many primary groups can an individual Linux user have? If they can have more than one, how does one go about assigning multiple primary groups to a user?
1
vote
1answer
93 views

Is there a whoami to find the current group I'm logged in as?

I'm trying to find my current logged in group without wanting to use newgrp to switch.
3
votes
1answer
39 views

What is the purpose of the 'ssh' group?

There is a system user named sshd on my system, and a group named ssh: $ cat /etc/passwd | grep ssh sshd:x:120:65534::/var/run/sshd:/usr/sbin/nologin $ cat /etc/group | grep ssh ssh:x:117: My guess ...
-2
votes
2answers
55 views

Delete all users and groups except root in debian

I would like to delete all users present by default on my Debian, but I wonder what can happen if I delete them... I am learning linux so I want to clean everything except root and play around with ...
1
vote
1answer
64 views

logrotate fails to rotate logs: error setting owner

Recently I've noticed that logrotate does not rotate my logs. user1@host:~$ /usr/sbin/logrotate /home/user1/logrotate.conf -v gives me an error: error: error setting owner of /home/logs/mylog.log.1 ...
1
vote
1answer
28 views

share encfs folder within the same group

given an encfs folder mounted under its own user, is it possible to permit read access to someone else (especially a system user), who belongs to the same group? For example user1 owns ...
1
vote
1answer
13 views

Access rights for directory, when you are a part of owner group [duplicate]

Right to the business, here is what I am trying to do foverzar@subsystem /home> ls -aln total 16 drwxr-xr-x 4 0 0 4096 Dec 12 23:07 ./ drwxr-xr-x 17 0 0 4096 Dec 4 13:51 ../ ...
1
vote
1answer
61 views

How to add users to Linux through a shell script

The shell script that I have to write has to create new users and automatically assign them to groups. This is my code so far: echo -n "Enter the username: " read text useradd $text I was able to ...
1
vote
1answer
44 views

Add multiple user to UNIX group in one line

On Centos 6.5 (and probably any) linux, I can create a group: sudo groupadd mygroup and add several users to it: sudo usermod -a -G mygroup userA sudo usermod -a -G mygroup userB sudo usermod -a ...
1
vote
1answer
46 views

group files into fixed-size chunks

Example: Say I have 20 000 images and I need to group them into folders in order to burn them to a CD (max 700MB / folder). General: I have N files and I need to group them into M groups, so that all ...
1
vote
1answer
37 views

Cannot edit visudo

I have to give my user permission to run sudo. I am using CentOs # uname -a Linux lab-hv1-centos1 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux and have ...
1
vote
0answers
24 views

What command should I use to explicitly set list of groups and execute a command?

To execute a command as other uid, one uses su. The list of supplementary groups is not specified on command line, but instead read from configuration files (/etc/passwd, /etc/group), etc. Which tool ...
1
vote
1answer
54 views

How to switch a group without asking for a password?

In linux, there's two files where group definitions are specified. One of them is /etc/group and the other is /etc/gshadow. I want my regular user to be able to switch a group while starting a process ...
3
votes
2answers
89 views

Can users in a group access a file that is in another user's home directory?

I have 3 users A,B and C inside a group 'admin'. I have another user 'D' in whose home directory, there is a project folder. I have made D as the owner of that folder and assigned 'admin' as the group ...
2
votes
1answer
18 views

(vsftpd) uploaded file group

I'm creating an ftp server with vsftpd, and I've almost finished, the only thing remaining is when I upload a file (logged as an user U), the file belongs to a group which has the same name (so group ...
-1
votes
1answer
28 views

Allowed group can't access a folder [closed]

I've a weird problem on my linux machine, I've multiple users, we can say u1, u2, u3... who all belong to a group G. I have a group folder in /home who belong to one of these user (we'll say u1), and ...
1
vote
6answers
248 views

How can I find out which users are in a group within Linux?

I've recently been creating new users and assigning them to certain groups. I was wondering if there is a command that shows all the users assigned to a certain group? I have tried using the 'groups' ...
2
votes
1answer
74 views

Negative GID in /etc/passwd?

I got following entries in /etc/passwd and /etc/passwd- on one system: userfoo:x:501:-513::/home/userfoo:/bin/false There's no group 513 anywhere on the system. What's this "negative" gid or a gid ...
1
vote
1answer
23 views

Group Directory permission

you have been asked by couple of programmers to make ProjectA a group directory on a UNIX server which allows them to create files under that directory to facilitate collaborative work, but only the ...
3
votes
1answer
77 views

How to specify owner and permissions for an NFS mount?

I have an NFS mount in fstab: 10.0.12.10:/share1 /net/share1 nfs rw 0 0 which defaults to root as owner and group and 777 permissions. How do I specify another owner and different ...
4
votes
2answers
70 views

Can an AIX user that appears in etc/group but not etc/passwd still log into a server?

Looking at etc/group and etc/passwd files, I see accounts listed in various groups in the etc/group file that do not appear in the etc/passwd files. Can these accounts still log in to the AIX server?
3
votes
1answer
64 views

Why there is a group member field in both /etc/group and /etc/gshadow

I am learning more about Linux user and groups in depth and noticed fourth field in both /etc/gshadow/ and /etc/group are exactly same. Do they have any difference or is there any special reason why ...
0
votes
1answer
65 views

user exists when trying to add user to systemd-journal group.

I have been wanting to read systemd-journal by running/using journalctl -b . Now if I run it as a user I get the following :- $ journalctl -b Hint: You are currently not seeing messages from other ...
0
votes
2answers
34 views

Can't change group permissions [closed]

I am currently having an issue which is preventing me from editing the group permissions for my '/media/rnetBackup/' directory. I have tried editing the permissions using nautilus and using chgrp -R ...
0
votes
1answer
40 views

Why can't I create directories under /root as a member of root? [duplicate]

I've done the following: sudo usermod -a -G root userA sudo su - root cd / chmod 775 root ls -aln -- drwxrwxr-x. 6 0 0 4096 Sep 13 22:04 root I can cd /root from my userA, but I can't make ...
1
vote
1answer
70 views

Read file permission denied despite sufficient permissions [duplicate]

I'm attempting to cat a file with 770 permissions as a user who is part of the group (but not the owner of the file). This should provide sufficient permissions to my understanding, yet I encounter a ...
1
vote
1answer
277 views

groupadd: group 'terminal' already exists in Linux

I have created a group called "terminal" using groupadd terminal and when I list out the groups using groups command it will not show the newly created group name in the output but if I add the same ...
2
votes
2answers
118 views

Why can't I create a file in a directory where I have group write access? [duplicate]

There's a situation I don't quite understand. I have this directory, where the group 'webadmin' has rwx rights : $ ls -la total 8 drwxrwxr-x 2 root webadmin 4096 Aug 27 12:17 . ⋮ ...
1
vote
3answers
45 views

If I delete groups, are users in those groups deleted?

I use ubuntu 14.04 and made 120 users. 115 users are in "student" and 5 users are in "assistant". If I delete groups, then are users in those groups deleted too?
1
vote
1answer
62 views

directory permissions [closed]

I'm currently working on a PHP server explorer, and I have to determine if a directory is empty or not readable because of insufficient permission. My web application is running under the user ...
1
vote
0answers
113 views

Give a user permission to one folder

I have set up my machine so that my group "sftponly" can access the users home folder. But right now, the users in the group don't have permission to other folders, but they have permission to see ...
1
vote
2answers
236 views

Where & How is user group information stored in Ubuntu? [closed]

Two places possible: /etc/group and /etc/passwd. If I use command: adduser [username] [groupname], then the user would be added to the group, and the file /etc/group would then be updated. However, ...
1
vote
1answer
38 views

Unable to execute program without root privileges regardless of group or permissions

avrdude is a simple tool that allows downloading of a program to a target microcontroller. For completeness, the command I am trying to issue is: avrdude -p atmega328p -c usbtiny -P usb -v -U ...
0
votes
1answer
98 views

Configure ssh users under a group [closed]

I created a group called ssh_group and currently have nearly 20 users under AllowUsers in /etc/ssh/sshd_config. After I created the ssh_group, I modified the AllowGroups line like this AllowGroups ...
-2
votes
2answers
77 views

How to prevent selected users from using “newgrp” with a password [closed]

I'd like to know how can I avoid add some users to a group? I need to avoid some users join to a group --I want to lock a group from some users, not all. Details lgroupmod -L dba ==> This ...
4
votes
0answers
323 views

Implications creating System Accounts “useradd -r” Linux Fedora/RHEL/CentOS

I want to know what are the implications of create an account using -r option? # useradd -r ... The help says: -r, --system Create a system account. System users will be created with no aging ...
2
votes
1answer
76 views

scp file as another group

I would like to scp a file, however my primary group does not match the permissions of the destination directory so I get a permission denied message when I try to scp. I have the correct group as a ...
1
vote
0answers
94 views

groupadd failure: “Cannot open audit interface”

I'm trying to add a group in a chrooted environment: root@my-host:/# /usr/sbin/groupadd -g 101 games Cannot open audit interface - aborting. I'm operating with root permissions. Additional info: ...
0
votes
1answer
35 views

Directory Permission Order [duplicate]

In Linux, let us assume we have a directory with the following properties: drwx---r-x 29 user1 group1 4096 Jun 22 14:11 dir1 can I, as user2 having group group1, navigate into dir1? Since ...
0
votes
1answer
51 views

What is FreeBSD equivalent of Linux /etc/gshadow?

FreeBSD version 9.0 I have here. It has /etc/passwd and /etc/group files as Linux does. I figured that Linux /etc/shadow corresponds to FreeBSD /etc/master.passwd. The open question is what FreeBSD ...
1
vote
1answer
100 views

How To Logout and Apply New Group Settings [duplicate]

Can someone please tell me how to logout and log back in again via the command line so that I can apply a new group's settings to a user. To put this in perspective, assume that I am currently logged ...
1
vote
1answer
76 views

List of group id actually used on Debian

How can I get a list of group id which are currently used for Debian OS. I know that e.g. 0-99 are reservered for Debian "intern" things, but I'm wondering which ID is used for which group inside this ...
1
vote
1answer
201 views

Linux Root group change chmod for root owned to 770

I'd like to have normal user account assigned to root group (which I've done already) and change mod of all files that are owned by root user to 770, If I understood it well in result of that every ...
4
votes
3answers
866 views

How to restrict a user to one folder and not allow them to move out his folder

I have ubuntu server on digitalocean and I want to give someone a folder for their domain on my server, my problem is, I don't want that user to see my folders or files or to be able to move out their ...
3
votes
2answers
103 views

How to update user/group settings of a running process?

Suppose I change some user settings like its initial login group or add it to a new group. I now can do su user and work with these new settings. But all the previously running processes will still ...
0
votes
0answers
175 views

How to Sync UNIX Passwords SAMBA4.x?

My current server is running Debian 8 jessie with Samba 4. Its purpose will be to host a simple file sharing server for around 100 people on Windows machines. I already have a collection of UNIX users ...
2
votes
2answers
288 views

Getting Group Names for List of Users

I have a text files with a list of users formatted like: name1 name2 name3 ... Calling the command groups gives the primary group name for that user. ex: bash$ groups name1 name1: ...
1
vote
2answers
52 views

Adding user to the group owning a folder doesn't give that user access

I have the following folders: drwx------ 4 ccote domain^users 4096 Apr 17 11:18 ccote drwxrwx--- 2 ccote ccote_jponchar_gnicolas 4096 Feb 20 10:58 ccote-jponchar-gnicolas ...