Questions tagged [users]

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

Filter by
Sorted by
Tagged with
0
votes
2answers
41 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
59 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
68 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
2k 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
982 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
169 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 ...
2
votes
1answer
785 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 ...
1
vote
1answer
1k 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
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
367 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
77 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
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
1answer
2k 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
1answer
40 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 ...
1
vote
3answers
76 views

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

When entering a sudo command file is there a way to set a parameter(s) which locks the file afterward so it cannot be modified, deleted, or overwritten by any other superusers? More specifically: I ...
0
votes
2answers
35 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 ?
-3
votes
3answers
1k 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
143 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
2k 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
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 ~]# [...
0
votes
1answer
190 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
76 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
207 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
106 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
81 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
44 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
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 ...
0
votes
0answers
60 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
1answer
55 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
265 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 / ...
2
votes
3answers
9k views

su - user Vs sudo su - user

sudo su - will elevate any user(sudoer) with root privilege. su - anotheruser will switch to user environment of the target user, with target user privileges What does sudo su - username mean?
1
vote
1answer
65 views

Changing group ownership of files - User management

Installed an application as root owner but not as non-root. why? Because we had to install this application in custom location(/app) So, after installing an application(Syslog-NG), below are the ...
1
vote
1answer
41 views

Creating samba users as system users

I want to provide access to my machine to a couple of colleagues; However I want these 2 users to be able to access only my shamba share; Is it considered a good practice to add them as system users ...
1
vote
1answer
46 views

Run every program as seperate user [closed]

For several reasons (such as security) I would like to run certain programs (say thunderbird, firefox) each as a different user. Meaning, I would like to ensure that whenever I (say userX) runs ...
1
vote
1answer
63 views

How can I centralise the user names passwords and permissions over a shared network? (CENTOS)

My question is I'd like to find out how I I centralise the user names, passwords and permissions? if I setup a new linux installation on a new system, how do I ensure it inherits all the same ...
0
votes
0answers
87 views

Want to preserve bashrc and vimrc when switching to non-root users

I'm on a multi-user system. I have sudo b/c I'm responsible I guess. Sometimes, I want to switch to another user to help them do something, but I have a tricked-out bashrc/vimrc and I'd like to keep ...
1
vote
1answer
775 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 ...
1
vote
2answers
59 views

How can I manage Microsoft Windows user accounts from Linux? [closed]

Is there any way to manage the user accounts for any Windows operating system installed on my hard disk from Linux? I.e: by booting some live distro and making all desired changes. The more useful ...
3
votes
1answer
230 views

Is it possible to give permission to a user via sudo for only a specific Bash script? [duplicate]

I'm an administrator of my Ubuntu 16.04.3. On this system, there are many users, who are in the list of sudoers. I'm thinking if I can make such a configuration as below: I'd like to create a Bash ...
0
votes
0answers
253 views

Effective and real user id matching? [duplicate]

I have the following script: $ ls -al setprog.sh -rwsrwxr-x 1 root root 52 Αυγ 2 10:23 setprog.sh $ cat setprog.sh #!/bin/bash while [ True ] do echo $(whoami) done When running it $ ./...
3
votes
1answer
747 views

Run cron jobs in intended python environment?

I have users root and user1 All of my python scripts have been created by user1 I have created a bash file that needs to be automated. The bash file calls my python scripts I have added my bash call ...
1
vote
2answers
44 views

Script which check who login by “su -”

I need find a way to list all current users which are using root account by su - For example: bob@test:~$ su - root@test:~# alice@test:~$ su - root@test:~# And now list normal users which using ...
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
0answers
115 views

Empty User Groups in Terminal Wrapper Applications

As of last Thursday, whenever I use any terminal (Konsole, Gnome Terminal, XFCE Termina, xterm), the groups are empty. $ groups tom When I execute the same command in a tty terminal outside of Xorg, ...
-3
votes
1answer
331 views

How to change password in brand new Unix user

First ever question for me. Straight to the point. I've added a user: sudo useradd -m _homedir_ _username_ Tried all of these but nothing worked: passwd _username_ chpasswd username: _password_ ...
1
vote
0answers
59 views

Add new attribute to IPA user info (Linux)

I am not sure its so straightforward on the Linux side. I want to add a new attribute to identify users as Contractor or Government. Is this recommended or possible within LDAP?
0
votes
1answer
155 views

How to create multiple IDs with same UID in AIX ? How to change UID of IDs in AIX?

How to create multiple IDs with same UID in AIX ? How to change UID of IDs in AIX ?