Stack Exchange Network

Stack Exchange network consists of 174 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.

1
vote
1answer
32 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
47 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
41 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 ...
-1
votes
1answer
32 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
69 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
27 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
0answers
15 views

Samba 4.7.1 multiple shares and access (CentOS 7.5)

I have started a file sharing server based on Samba 4.7.1 and CentOS 7.5 My goal is to setup private shares for groups or single users and one public share with only to read permission. I made ...
0
votes
1answer
29 views

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

Introduction I need to create a new user, and it needs to have a custom file named "config.sh". Question So far what I do when creating a new user is: sudo useradd –c "New User" –md /home/NU ...
1
vote
1answer
53 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
2answers
95 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
93 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
39 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
55 views

Script that displays information about most used processes

my script is `echo 'CPU:' | ps -eo pid,%cpu,pmem,vsz,time,command --sort=-%cpu | head -1` echo 'VSZ:' | ps -eo pid,%cpu,pmem,vsz,time,command --sort=-vsz | head -1 but I dont know how to write the ...
0
votes
0answers
20 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
26 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
30 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
54 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
979 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
628 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
28 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
46 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 ...
0
votes
1answer
77 views

How a non-root user sudo to another non-root user without password?

As root, created a new non-root user on RHEL 7.5 appuser:x:1903:1903:appuser:/home/appuser:/bin/bash A non-root user to be able to sudo to appuser, sudo -u appuser without a password, What are ...
0
votes
1answer
75 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
30 views

How to use service to start/stop app with non-root access?

RHEL 7.5 Currently installed an application as root in /app. As part of administration, application will start/stop using /sbin/chkconfig & /sbin/service utilities All the application binaries ...
1
vote
0answers
36 views

Websocket server won't connect if started via PHP

I have a websocket server written in Node. The following instruction, when executed from the command line starts the websocket server successfully: nohup "/root/.nvm/versions/node/v8.11.1/bin/node" "/...
1
vote
0answers
31 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
67 views

Changing a user's password within a script doesn't work [duplicate]

For reasons I want to change a user's password to a random one every X minutes using a script. It's a debian machine, the following script is started via @reboot in root's crontab and the script is ...
0
votes
0answers
53 views

User accounts and groups exist but don't exist

I'm running a clearos server for my dad's home business, it was all set up and working completely OK, no issues with the fileshare or group permissions. Now my dad is telling me that the fileshare is ...
0
votes
1answer
36 views

find last 15 users that logged in - even if some of them already logged out

i need to find the last 15 users that logged in to the system. i know there are commands like 'w' or 'who' or 'users' but as much as i know those commands refer only to users currnetly logged-in. but ...
0
votes
0answers
13 views

Start interactive bash session with custom config without saving it as a file

I have a string variable that I want to use as a bash rc file (contains aliases and shopt commands), and start a new bash session as a different user. Something like this: sudo su - myuser --session-...
0
votes
3answers
55 views

Is there a way to protect a file in any way so that other superusers CANNOT modify, delete or overwrite it?

Due to keyword hell I can't find the answer to this question and I'm hoping someone can let me know what the answer is. When entering a sudo command file is there a way to set a parameter(s) which ...
0
votes
0answers
21 views

configured ldap server rhel 6

I successfully configured ldap server on rhel 6 first time using the steps available on net.But I am not much aware about ldap server. I created two users user1 and user2 on ldap server.and ...
0
votes
2answers
33 views

Why different command scripts are used for the same command when run as a normal user and when run as a root user?

I see the script location for the command date for a normal user, it shows which date /bin/date But when I run the same command from root it shows the output /usr/bin/date. Why so ?
-4
votes
3answers
160 views

Grant full root permissions to an user

In /etc/sudoers i added: %myuser ALL=(ALL) NOPASSWD:ALL Now if i type sudo apt update i don' t need to type the password. But i want full root permissions: namely, i want to use only apt update. The ...
1
vote
0answers
53 views

ypcat passwd not able to list if the user has 3 digit user id

I am trying to migrate nis server from solaris to redhat(7.5), as per the doc I have exported /etc/passwd and /etc/group from solaris to redhat and made NIS up and running. If my /etc/passwd is e.g.: ...
0
votes
1answer
281 views

SSH configuration: chown username:group: says invalid user

My Ubuntu16.04.4 server has username: graycodes THE ERROR OUTPUT: chown: invalid user: 'vagrant:vagrant' I'm setting file permissions for OpenSSH. What I'd like is to keep my username as ...
0
votes
0answers
44 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
20 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 ~]# [...
0
votes
1answer
60 views

useradd with no options

When I create a user with useradd (no option) I can later add his passwd by using passwd new_user. How can I create his correct home directory (with Desktop and Templates inside) and all other ...
0
votes
2answers
69 views

Where to store proprietary code and executable scripts? [closed]

I have Python code that is run using a bash script. I want non-sudo users to be able to run it without making the Python code readable. What is the recommended pattern? Two ways I considered: Put ...
-1
votes
2answers
48 views

Switch back and forth between chroot jail and Host in the same terminal

I have a created a chroot jail in my Ubuntu 14.04 machine using schroot and debootstrap. Now I want to write a shell script that goes back and forth between my native environment and the chroot. ...
2
votes
3answers
42 views

Are there any practical reasons for setting a maxlogins limit for users in limits.conf? What are the benefits?

Why should I set a maxlogins limit in /etc/security/limits.conf? In other words, are there any performance-related and security-related benefits to be gained? I have only three users on my machine, ...
3
votes
1answer
75 views

Creating users own “root” [closed]

So my goal on this is to give each user their own "root" by basically making a loop drive with a copy of core files. I know there is stuff like jail shell, and all that fun stuff that makes it a bit ...
1
vote
1answer
38 views

Can't log in to other users on a debian system

I can't log in to KDE, as other users to the GUI on my Debian systems only the user created at install. I can log on in the command line: su - user into the users login but only in the shell. I ...
1
vote
2answers
283 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 ...
10
votes
3answers
811 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
29 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 ...
0
votes
0answers
56 views

Is there a recommended way to access files owned by a non-user UID?

Suppose a multiboot computer on which two GNU/Linux distributions are installed, each with its own user(s). Say those users don't share the same UID over the two systems. Now one needs to access the ...
4
votes
0answers
25 views

Temporarily restrict logins for a user to a single IP

Background I have a bunch of Raspberry PI 3 devices running Linux, which are shared among multiple engineers. For the sake of simplicity, each Linux box has the same default username/password (i.e. ...
2
votes
1answer
37 views

how to re-mount a home directory of a specific user to a partition

My system is Ubuntu and there are three users on it. Also, I have some partitions: /dev/sda1, /dev/sda2 and /dev/sdc1. For now the whole /home directory is mounted on the /dev/sda2, the whole root / ...