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

Questions tagged [users]

Anything related with user accounts and user management on Unix-like systems.

0
votes
2answers
44 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. ...
0
votes
2answers
23 views

delete folder for all users on Mac

I'm using below command to delete folder rm -rf /Users/*/Library/Group\ Containers/UBF8T346G9.Office/User\ Content.localized/Templates.localized/ The command is working only for single user. I want ...
0
votes
1answer
27 views

MESSAGE=anthony … USER=root <— Does this mean that the root user is the actual user but “anthony” will be displayed as being the user anyway?

I found this in /run/log/journal/... MESSAGE=anthony : TTY=pts/10 ; PWD=/ ; USER=root ; COMMAND=/usr/bin/find / -name *systemctI* I'm wondering what this means? I'm suspicious of this process "...
0
votes
1answer
34 views

Prevent FTP users from moving directories

I'm essentially trying to disable the mv command for FTP users on my CentOS server. I was thinking of editing their .bash_profile file and using this: alias mv="" But that feels system breaking. ...
1
vote
1answer
42 views

How should I create a user that I can use to safely run web apps etc.?

I'm doing this over ssh. I want to create a user that: can't be accessed via ssh can be impersonated with su doesn't have a password (is this a good practice?) can run web apps (specifically ...
0
votes
2answers
29 views

How do I switch users on Amazon Linux for EC2 instances?

I saw How to change to normal user in the command line when logged in as the root user? How to switch between users on one terminal? I have access to sudo. I tried [ec2-user@ip-172-99-99-99 Weekly ...
0
votes
0answers
23 views

User Lastlog login datetime did not update

I use lastlog to check latest login datetime. Here are steps I use to update my latest login datetime. 1) Try to Login to that user sudo su userA 2) Exit that user and login to root then check ...
0
votes
1answer
29 views

Group membership reported by id vs. contents of /etc/group

I have some issues with permission from various apps (such as accessing serial ports, despite being the dialout group, or contacting to Docker daemon, despite being in the docker group -- I think) and ...
0
votes
1answer
25 views

Why is my service running as root

I have an old laptop hooked up to my router running as linux box. I installed qbittorrent to run as a remote torrent box (to download linux distros of course) and I created a new user, "qbuser" for it ...
1
vote
1answer
49 views

Script or makefile to automate new user creation?

I'd like to have either a shell script or makefile to automate new user creation. I can't decide which of approach is better - a script or makefile? I have two types or users - both are SFTP chrooted,...
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
14 views

FreeIPA User management: create user and activate user split in two roles

Objective: FreeIPA Helpdesk user A is permitted to create new stage users; new accounts are by default disabled. Activation requires any other member of Helpdesk than user A to go in and enable the ...
0
votes
2answers
64 views

How to preserve shell variables in script after changing user

How can I access same variables data after switching users? For example: artifact=archive.tar.gz workdir=/home/user echo "$workdir/$artifact" sudo -u otheruser bash echo "$workdir/$artifact" ...
1
vote
0answers
26 views

Fedora 29 - Switching to new user using “login” seems to fail

I just installed Fedora 29 (Xfce edition). The uservc was created during installation. I created another user as user2 (with the password: u) from the terminal but I am not able to log in with user2. ...
-2
votes
0answers
55 views

Avoid using sudo for starting/stopping services

I'm used to using sudo in order to start/stop services. I'd like to add a capability to an user in order to avoid using the sudo command. I am using Ubuntu 18.08. I don't know which capability nor ...
1
vote
0answers
28 views

Primary Group returns a number? [closed]

I'm somewhat sure that previously my primary group was something in text, but after running some stuff (I don't have admin, so I couldn't have changed it myself) all of a sudden my primary group ...
0
votes
0answers
16 views

Switch user providing own password

While switching to a privileged user, we enter the privileged user's password. Can I use my own password instead? Current flow: user1 -- > serviceAcctUser (serviceAcctUser password) Required: user1 -...
0
votes
1answer
61 views

Can't login as user

Everything works as root. I can startx, and get into iceWM. I'll be using i3, but that works aswell through lightdm if I login as "other" then write "root". Loging in in a TTY works aswell, but only ...
0
votes
1answer
38 views

Does POSIX guarantee certain usernames?

In the POSIX Definitions there is specific section 3.424, User Database, which defines what information should be related to each user ID. However through out the document, I couldn't find (at least ...
1
vote
2answers
48 views

User bypasses DenyUsers on Debian 8

So I have a user called spring and although my sshd_config says DenyUsers spring, I can login with PuTTY into that user. I restarted the SSH service of course. The non-comment lines from /etc/ssh/...
2
votes
1answer
53 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
15 views

Communicating between userland and kernel space (KEXT) on MacOS

In order to make it easier to develop a kernel module, I am considering Loadable kernel modules (LKMs) on MacOS. This way you have a base kernel module and your main kernel module which is an LKM ...
1
vote
0answers
14 views

How to get notified of a USB plugin and manually specify the driver to use

I am trying to get at the bottom of how to intercept when a USB is plugged in, so that you can completely customize the experience of plugging it in and using it. Without anything else happening. That ...
2
votes
1answer
43 views

Keep access to a file after sudo

user1 runs sudo -u user2 SomeCommand. I want SomeCommand to be able to access the files of user1 (or just a specific directory or even a single file, if that's easier), without giving access to user2 (...
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 ...
1
vote
1answer
79 views

ssh-copy-id ask for password

I created user and generated key with this commands root# mkdir /usr/share/foreman/.ssh root# chmod 700 /usr/share/foreman/.ssh root# chown user:user/usr/share/foreman/.ssh root# su user -s /bin/...
1
vote
2answers
66 views

What differences are between ways to prevent a user from logging in, by passwd and shadow files?

From https://unix.stackexchange.com/a/314732/674 In contrast to user accounts, service accounts often don't have a "proper" login shell, i.e. they have /usr/sbin/nologin as login shell (or, back in ...
0
votes
2answers
62 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
61 views

how can i make a file in /opt/ which will be owned by 2 users, 3 groups and other should not have any kind of access [closed]

I want to know how I can make a file in /opt/, that will be owned by 2 users and 3 groups, and others should not able to access it.
0
votes
1answer
42 views

Shared sub-directory between multiple users [duplicate]

I have two users with home directories: /home/user1/ /home/user2/ I would like to share a folder between the two users: /home/user1/some/path/to/folder but would only like user2 to have access to /...
0
votes
1answer
71 views

Does a user have to log in to run a process and become its owner?

In general, does a user have to log in to run a process and become its owner (ruid, or euid)? Does this apply to any user or any non-root user? For example: In the boot sequence of Linux, the kernel ...
2
votes
2answers
55 views

Set $PATH as OpenLDAP attribute

I need to set $PATH for OpenLDAP users (CentOS6/7). Not in .profile, not in .bashrc on client machine, but as attribute in LDAP on the LDAP server so it is set whenever the user logs onto any host via ...
0
votes
2answers
49 views

Is the www-data user pre-configured in Linux and Unix systems?

I personally usually use Debian based systems but I ask the following question on the entire *nix family of operating systems. Is the www-data user usually using as the Apache/Nginx already comes ...
1
vote
0answers
54 views

whoami returns user, but usermod complains it doesn't exist

I have Linux (Ubuntu) on a VM provided by corporate IT in my organization, and I have a user "myuser". whoami is able to return the username: myuser@host:/home/myuser$ whoami myuser id returns info ...
0
votes
1answer
35 views

Who have previously accessed a shared file?

I just discovered a mistake in the permissions setting of our system. It's kind of serious because it allows normal users to access something they shouldn't see. Currently the mistake has been fixed, ...
2
votes
1answer
72 views

How essential are usernames ( compared to uids )?

Background: I recently read about a freedesktop.org-bug which allowed executing any systemctl command for uid > INT_MAX. Thus I ran: root@host$> useradd -u 4000000000 largeuiduser root@host$&...
2
votes
1answer
85 views

How can I switch users in GNOME?

I'm using Fedora 29 desktop and GNOME 3.30. When we had a Mac, my wife and I could share the same computer by just simply "switching users". It would leave the previous user still logged in. ...
0
votes
1answer
44 views

How do I create a new user and a new file in its directory?

I need to create a new user, and it needs to have a custom file named "config.sh". what I do when creating a new user is: sudo useradd –c "New User" –md /home/NU newuser –e 20/12/2018 –s /bin/bash –...
1
vote
1answer
255 views

How to properly set Environment variables (golang on Manjaro)

I have a problem with my go installation. I'm using Manjaro and I think it is related to this as Manjaro seems to handle the go env differently then suggestest by ubuntu and windows. I have go ...
1
vote
1answer
109 views

Why is top command showing users that the who command is not?

Working on a Raspberry Pi 2, running Raspbian GNU/Linux 9 (stretch). I am simply trying to understand why, when I run the top command I can see some users that I cannot see in the who command. Here ...
0
votes
1answer
98 views

What are necessary users used for

I want to know which users are necessary for an Unix/Linux system. Now I found a doc which told me that there were three necessary users: root, bin and daemon. For the user bin and the user daemon, I ...
-1
votes
1answer
44 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
0answers
23 views

Allow www-data to read files from NFS share

I have a virtual machine in a larger Linux network (with unified UIDS/GIDS) that has mounted an NFS share from a fileserver. I want to run a small nodejs server application on that machine. For ...
0
votes
2answers
32 views

How could I find the Plan command?

I tried finger and find a Plan $ finger $USER Login: me Name: me Directory: /Users/me Shell: /usr/local/bin/bash On since Tue Nov 13 07:33 (CST) on console, idle 1 ...
0
votes
2answers
36 views

Is it safe to remove all user passwords except root?

Is it safe to remove all passwords (passwd -d) from users, including service users like apache, bind, and others, and keep only the root password? I suspect that a malicious user may have set a ...
0
votes
1answer
59 views

How to add a new user and disable its root login? [closed]

A sysadmin may want to add a new user that will have no root access (nor sudo). I don't sell hosting services but I can bring this field as an example; an hosting company gives its customers the ...
7
votes
4answers
1k views

BASH: Check in /etc/shadow if user password is locked

Objective: Check in /etc/shadow if user password is locked, i.e. if the first character in the 2nd field in /etc/shadow, which contains the user's hashed password, is an exclamation mark ('!') ...
5
votes
3answers
699 views

Newly created user on Ubuntu Server has the wrong shell prompt

I've created a new user in the Ubuntu 18.04.01 like this: sudo useradd svn sudo passwd svn sudo mkhomedir_helper svn sudo usermod -d /home/svn -m svn Problem is, that if I switch to the user by su ...
1
vote
2answers
48 views

When using cloud-init, what order are the users created in?

I am using cloud-init to initialize a RHEL Atomic Host VM. I have the following as my user-data file: #cloud-config groups: - ourgroup users: - name: muser primary_group: ourgroup ...
1
vote
1answer
92 views

sudo -su vs sudo su -

On RHEL 7.5, I created a non-root user and would like to switch from one non-root-user to another non-root-user, without password. First tried, sudo -u user1, command syntax error then tried, sudo ...