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

learn more… | top users | synonyms

67
votes
5answers
91k views

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 ...
62
votes
3answers
231k views

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?
53
votes
4answers
12k views

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 ...
29
votes
7answers
19k views

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 ...
28
votes
4answers
10k views

Is it possible to rename a Unix user account?

I installed Ubuntu on a computer that is now used by somebody else. I renamed the account with her name, but it only changes the fullname, not the user name, which is still displayed in the top right ...
28
votes
4answers
28k views

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

Why did a new user inherit files from a deleted user?

So I had to do an exercise in a book as homework. First you had to create a user like: useradd -c "Steven Baxter" -s "/bin/sh" sbaxter Then you had to add some files to the /home/sbaxter directory: ...
21
votes
5answers
2k views

Recovering from setting root's shell to a bad file

Let's say I've gone and done a silly thing, such as using 'chsh' to change the root user's shell to a bad file path. Future logins to the root account will abruptly fail, citing /bin/whatever not ...
20
votes
1answer
3k views

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 ...
20
votes
6answers
11k views

How do you create a user with no password?

In os X it's possible to have users without passwords. If you inspect them with dscl their password show up as *. This is used for system users such as users for databases like mysql, pgsql etc. ...
18
votes
11answers
3k views

How to create strong passwords in Linux?

I wonder how I can create strong passwords on Linux (for both normal and admin users) and if there are specific programs to do that.
17
votes
5answers
6k views

Add a user to the system *only if it doesn't exist*

I've been running the useradd {user} command to add users to my system, though I plan on running this in an automated environment, and it might end up being run again, even though the user already ...
17
votes
2answers
38k views

How can I change a user's default group in Linux?

Being new to Linux administration, I'm a little confused about the following commands: useradd usermod groupadd groupmod I've just finished reading the user administration book in the Linux/Unix ...
16
votes
2answers
45k views

What user should apache and PHP be running as? What permissions should /var/www files have?

I just spun up an Ubuntu 11.10 box and then ran apt-get install apache2 php5 to install apache2 and PHP 5 on the box. Now it is functioning as a "web server" and it loads the "It Works!" page. Now I'm ...
15
votes
4answers
12k views

How do I completely disable an account?

How do I completely disable an account? passwd -l will not allow anyone to log into an account using a password but you can still log in via private/public keys. How would I disable the account ...
15
votes
2answers
7k views

How to apply changes of newly added user groups without needing to reboot?

Assume I'm logged in with user takpar: takpar@skyspace:/$ As root, I've added takpar as a member of group webdev using: # usermod -a -G webdev takpar But it seems it has not been applied. because ...
14
votes
2answers
6k views

How can I determine if someone's SSH key contains an empty passphrase?

Some of my Linux & FreeBSD systems have dozens of users. Staff will use these "ssh gateway" nodes to SSH into other internal servers. We're concerned that some of these people use an unencrypted ...
14
votes
2answers
13k views

How to create a user with limited RAM usage?

So I have 4 GB RAM + 4GB swap. I want to create a user with limited ram and swap: 3 GB RAM and 1 GB swap. Is such thing possible? Is it possible to start applications with limited RAM and swap ...
13
votes
11answers
1k views

Concern about logging in as root overrated?

For personal linux on my personal notebooks, I've usually set my environment to autologin as root even under X or lower runlevels. I've found my workflow is very pleasant and fast, without any ...
13
votes
3answers
15k views

Which users are allowed to log in via SSH by default?

When I set up my Debian 6, I was wondering, which users apart from root whose password I know can log into my system via SSH? When I install Apache 2 a user called www-data gets created. Does this ...
13
votes
3answers
1k views

Can I limit a user (and their apps) to one network interface?

As the title really. I've actually got two scenarios to apply this: Multiseat Desktop: two network connections both with internet gateways and two accounts doing bandwidth-intensive tasks on each. I ...
12
votes
3answers
4k views

Creating a user who cannot get an interactive shell

What are interactive and non-interactive shell? Questions: Create a user john who should not get an interactive shell. How can we do this?
12
votes
1answer
2k views

Can one PC be used by two users at the same time via dual-monitor?

Since modern PCs can use two screens at the same time I wonder if it is possible to plug in two keyboards and mouses as well to have the two screens run two (more or less) independent X-sessions at ...
12
votes
1answer
611 views

How to tell sudo to repeat lecture once?

I'm letting one of my coding buddies have root access to my Raspberry Pi, and as I was getting everything set up, I tested sudo as him. It gave me "the speech": We trust you have received the ...
12
votes
4answers
5k views

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 ...
11
votes
4answers
16k views

can we know the password for the other users if we have root access?

If a person has root access to a particular RHEL machine, will they be able to retrieve the password of the other users?
11
votes
4answers
17k views

User-friendly command to list all users on Ubuntu system?

Is there a user-friendly command I can use to list users in a console on an Ubuntu system? When I cat /etc/passwd I get a hard-to-read list of users. It would be nice to see an alphabetized list, ...
11
votes
1answer
433 views

How is file owner and group remembered for an external drive?

I formatted an external hard drive with an ext4 partition and subsequently mounted it. So that I could use the new partition, I did: sudo chown me:me /mount/directory to change the file owner and ...
11
votes
1answer
7k views

How do I set a user's default .bashrc file?

On Ubuntu 10.4 I have edited the /etc/bash.bashrc file to set some variables like the command history size (HISTSIZE=5000), however if I create a new users Ubuntu by default gives them a .bashrc file ...
10
votes
2answers
25k views

User's Login date and login time

I want to fetch user's login time and login date, is there any command in Unix providing User's login date and User's login time ? this problem i want to perform in Shell-script where username is ...
10
votes
3answers
3k views

How can I make a user able to log in with ssh keys but not with a password?

I would like to create a user and have no password. As in you cant log in with a password. I want to add keys to its authorized_keys by using root. This is for my automated backup system.
10
votes
2answers
4k views

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 ...
10
votes
1answer
7k views

Meaning of root:wheel

What does root:wheel mean in the following? chown root:wheel myfile
10
votes
6answers
5k views

What does the “number” in the owner field of files signify in linux?

I copied many files to my new linux host. I see that all files have the owner and group both set to 515. What does that mean?
10
votes
4answers
2k views

What are the dangers of creating a normal user with UID < 500?

What are the dangers of creating a normal user with UID < 500? Assuming the UID's are not duplicates of existing UID's, what could go wrong? This is not something that I want to do, but something ...
10
votes
1answer
458 views

Why are user IDs recycled?

The other day, I deleted a user from one of our servers. That user had the ID 1002. Today, I've added a new user to the system. To my surprise, he got the user ID 1002. Because I neglected to delete ...
10
votes
2answers
4k views

How do I leave a message for another (local) user?

I know you can use write to send a message to a currently logged in user, but how do you leave a message for a user who is not logged in? The solution I have seen is modify the motd, but that will be ...
9
votes
3answers
3k views

What is the point of the 'operator' user?

Many un*x systems ship with a user account named 'operator'. What is the purpose of this account? Do some systems actually make use of this account, or is this more of a historical legacy? Have you ...
9
votes
2answers
1k views

Why is /etc/passwd open to public for reading?

Is there any reason that /etc/passwd should be world-wide readable ? It's not like password hashes that shouldn't be exposed, I just want to know why.
9
votes
1answer
3k views

In /etc/group what is the meaning of the second field?

A sample /etc/group file contains the following entries: root:*:0: adm:!:4:logcheck antoine:x:1000: The man pages I've read (Debian & OSX) says the second field is to store a group password. ...
9
votes
1answer
844 views

User permissions inside and outside of LXC containers?

I'm running some services inside of Docker LXC containers on my server and I'm beginning to actually do serious things with them. One thing I'm not clear on is how user permissions work inside and ...
8
votes
3answers
464 views

Why is konsole reading /etc/passwd?

In relation to this question: While observing the behavior of fatrace, I notice something which concerns me. Here are the first few lines of output of the command "fatrace|grep konsole" ...
8
votes
5answers
12k views

Can a linux user change their password without knowing the current password?

I'm setting up a few ubuntu boxes, and using opscode's chef as a configuration tool. It would be fairly easy to install public keys for each user on each of these servers, and disable password ...
8
votes
1answer
5k views

Group within group file permissions

I tried finding this on here, but couldn't so sorry if it's a duplicate. Say I have 2 groups and a user: group1, group2, user1 with the following structure: group1 is a member of group 2, user1 is a ...
8
votes
2answers
7k views

GID, current, primary, supplementary, effective and real group IDs?

The following links discuss these concepts in different contexts. I have read their definitions, but I still can't tell how they are related, or if some of them are just the same. Current group ID ...
8
votes
4answers
1k views

Multiple Users on a Desktop Environment

This is probably a REALLY stupid question. But anyways, lets pretend we had a *nix rather powerful system... Now Obviously I know you can set up multiple users to login to a system.......but how ...
8
votes
1answer
641 views

Lightweight virtualization on Linux with user isolation

What Linux-on-Linux virtualization technologies provide user isolation? Specifically, I want root in the virtual machine not to have any privilege on the host. This was not the case for LXC, but was ...
8
votes
1answer
370 views

Why does the 'w' command show phantom logged in users?

On Linux (Fedora 14), the "w" command says this: [USERNAME@PC ~] w 23:51:32 up 13 min, 7 users, load average: 0,22, 0,42, 0,34 USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT ...
7
votes
3answers
710 views

Does character 'ä' in usernames cause bugs in linux systems?

I want to use my first name as an username but it contains character 'ä'. I found this thread. Now I understand, why some some characters are disabled, but what about 'ä'? Can this character cause ...
7
votes
3answers
2k views

Once sudo su'd to root, is there a command to see my username?

I have sudo rights on a redhat box; once I've sudo su - to become root in a shell, are there any commands I can run to see what username I su'd FROM?