Anything related with user accounts and user management on Unix-like systems.
Questions tagged [users]
1532 questions
720
votes
10 answers
How to switch between users on one terminal?
I'd like to log in as a different user without logging out of the current one (on the same terminal). How do I do that?
tshepang
- 64,472
- 86
- 223
- 290
490
votes
13 answers
How do I remove a user from a group?
Which command should I use to remove a user from a group in Debian?
When adding a user to a group, it can be done with:
usermod -a -G group user
However, I could not find a similar command (accepting a group and user as arguments) for removing the…
Lekensteyn
- 20,173
- 18
- 71
- 111
196
votes
3 answers
What's the difference between a normal user and a system user?
Some documentation I'm going through has a boolean switch on whether or not a user is a 'system' user or a 'normal' user (defaulting to 'normal').
What is the difference between these two modes of user-ship? I don't need to learn what a user is or…
Sean Allred
- 2,429
- 3
- 17
- 20
164
votes
3 answers
The name > org.freedesktop.PolicyKit1 was not provided by any .service files
When attempting to launch system-config-users from command line, I get the following warning, and the tool does not open. I'm using CentOS 7 with Mate 1.8.1.
WARNING **: Error enumerating actions:
…
a coder
- 3,184
- 9
- 42
- 63
153
votes
11 answers
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' command however whenever I use this it says…
Jess Louise
- 1,651
- 2
- 11
- 6
142
votes
6 answers
What are other ways to share a tmux session between two users?
I'm looking for a clean and easy way to share a tmux session with another user on the same machine. I've tried the -S socket-path option, but it requires opening up all permissions of the socket-path before someone else can connect to the session. …
Ryan McGeary
- 1,525
- 2
- 10
- 8
129
votes
7 answers
How can I look up a username by id in linux?
The command id can be used to look up a user's uid, for example:
$ id -u ubuntu
1000
Is there a command to lookup up a username from a uid? I realize this can be done by looking at the /etc/passwd file but I'm asking if there is an existing command…
cwd
- 44,479
- 71
- 146
- 167
122
votes
8 answers
Disable a user's login without disabling the account
Let's say I create a user named "bogus" using the adduser command. How can I make sure this user will NOT be a viable login option, without disabling the account. In short, I want the account to be accessible via su - bogus, but I do not want it to…
Malabarba
- 2,009
- 3
- 15
- 14
112
votes
7 answers
Creating a user without a password
I'm trying to create a user without password like this:
sudo adduser \
--system \
--shell /bin/bash \
--gecos ‘User for managing of git version control’ \
--group \
--disabled-password \
--home /home/git \
git
It's created…
Erik
- 1,687
- 3
- 13
- 11
104
votes
5 answers
How to check if a user can access a given file?
*nix user permissions are really simple, but things can get messy when you have to take in account all the parent directory access before reaching a given file. How can I check if the user has enough privileges? If not, then which directory is…
Metalcoder
- 1,185
- 2
- 8
- 11
103
votes
4 answers
Command to list PostgreSQL user accounts?
There are createuser & dropuser commands:
createuser - define a new PostgreSQL user account
dropuser - remove a PostgreSQL user account
Is there a corresponding way to list the user accounts?
These two commands do not require the user to invoke…
CW Holeman II
- 3,654
- 5
- 31
- 49
101
votes
8 answers
Does /usr/sbin/nologin as a login shell serve a security purpose?
In my /etc/passwd file, I can see that the www-data user used by Apache, as well as all sorts of system users, have either /usr/sbin/nologin or /bin/false as their login shell. For example, here is a selection of…
Mark Amery
- 2,860
- 6
- 22
- 29
88
votes
4 answers
What does adduser do that useradd doesn't?
In addition to the more widespread useradd, Debian based systems also contain an additional adduser command which provides a higher level interface for adding users and some related tasks. There are various questions/answers on other SE sites which…
Graeme
- 33,607
- 8
- 85
- 110
86
votes
2 answers
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.
Ian F
- 2,101
- 2
- 10
- 10
85
votes
10 answers
How do you kick a benign user off your system?
I was googling this a bit ago and noticed a couple of ways, but I'm guessing that google doesn't know all. So how do you kick users off your Linux box? also how do you go about seeing they are logged in in the first place? and related... does your…
xenoterracide
- 57,918
- 74
- 184
- 250