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

learn more… | top users | synonyms

6
votes
2answers
5k views

I added a user to a group, but group permissions on files still have no effect

I changed permissions of a file (chmod g+w testfile) and running ls -l testfile gives: -rwxrwxr-x 1 user1 user1 0 2011-01-24 20:36 testfile I then added a user to that group ("/etc/group" has ...
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 ...
7
votes
2answers
2k views

How to restrict internet access for a particular user on the lan using iptables in Linux

Let's say there are two users on the LAN, A and B. How do I restrict user A from internet access using iptables rules and saving the rules so that after reboot, they are still effective. And suppose I ...
20
votes
1answer
2k 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 ...
14
votes
2answers
6k 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 ...
12
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 ...
12
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 ...
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 ...
15
votes
2answers
35k 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 ...
6
votes
2answers
19k views

How to add a ssh user who only has permissions to access specific folder?

How to add an ssh user who only has permissions to access specific folder? useradd -d /var/www/xyz.com.tr/musteri -s /bin/bash -g sshd musteri I created a user called musteri. I set its home ...
2
votes
2answers
435 views

What does the `who` command result `root :0` mean?

The return value of command who will always include root :0 in X Window pts. I guess it actually means the GNOME login. Am I right? Another question is where to get this knowledge, as I don't see it ...
53
votes
4answers
11k 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
18k 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 ...
27
votes
4answers
25k 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 ...
9
votes
2answers
3k 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 ...
5
votes
3answers
6k views

Disable user shell for security reasons

We have several user accounts that we create for automated tasks that require fine-grained permissions, such as file transfer across systems, monitoring, etc. How do we lock down these user accounts ...
8
votes
1answer
632 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 ...
7
votes
3answers
692 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 ...
5
votes
3answers
1k views

How can I create automatically expiring user accounts?

This is what I'd like to be able to do: After a user's account is created, they should be able to ssh-tunnel, but their account is automatically removed after 30 days unless the countdown is reset by ...
5
votes
3answers
465 views

Unix users, groups, and permissions

I don't understand unix users, groups, permissions, etc. For example, things managed by the chmod, chgrp, usermod, groupadd, etc. commands. How do all these things work?
4
votes
3answers
3k views

How to find the machine from which a user logged into current machine using ssh?

In a multi server architecture, is it possible to find out from which machine a user logged into current machine using ssh? For example, user1 logged into host1. From there, the user logged into ...
6
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 ...
6
votes
7answers
2k views

Is it bad practice to set root's shell to something other than the default?

Once a friend of mine (who is an experienced Unix/Linux user) told me that setting root's shell to something other than sh (i.e bash or zsh) might create problems, because some script might assume ...
4
votes
3answers
120 views

Local Account Creation Date

For compliance purposes there is the need to fetch information regarding local (user and non-user) accounts creation date on UNIX machines. Is there any way (even if it's not the most reliable or ...
4
votes
4answers
146 views

“Who” prints duplicated usernames

This is result of who -uH: NAME LINE TIME IDLE PID COMMENT me :0 2013-08-29 01:29 ? 1686 (:0) me pts/0 2013-08-29 01:42 old ...
2
votes
3answers
185 views

How to create a user account with specific permissions?

I want to create a unix user account with specific permissions: this user must be able to install software, but can't remove software. Furthermore, when the user logs in, root must receive a ...
14
votes
2answers
43k 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 ...
8
votes
2answers
6k 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 ...
12
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 ...
6
votes
3answers
19k views

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 ...
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 ...
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. ...
6
votes
3answers
4k views

Why are underscores not allowed in usernames in some distros (Debian for example)

So why has the underscore been considered a bad character for user names in Debian (and possibly other distributions) while it has been removed from adduser's NAME_REGEX in Ubuntu?
5
votes
2answers
487 views

Deleting users with nologin shell

On a security audit performed on our production Linux servers , we were asked to remove nobody user if no application are using it. I checked and could see that there are no files owned by 'nobody' ...
4
votes
2answers
965 views

How to see who is logged on to many workstations?

Before I go to work creating my own I would like to find an existing system to do the following: Provide a concise list of users logged on to any of the workstations Show workstation host name, IP, ...
7
votes
2answers
5k views

Why is sudo telling me my password is wrong?

I recently installed OpenBSD 4.9 in my computer, so I could learn a little bit about Unix-like operating systems. I added a new user to the system called bruno. Ok. When I use the 'sudo' command, it ...
6
votes
1answer
2k views

Why can't I use arrow keys in terminal on Debian 6? (nonroot)

When I am on a non-root user I cannot use ↑/↓ to list my previous commands, and if I am typing I can't use ←/→ to say, add in a directory or to correct the ...
4
votes
2answers
97 views

Fully seperate two accounts without installing seperate operating systems?

Our class is finally installing Mint Linux on our machines. The problem is our teacher is scared that we'll play war games against the two classes that use the computers. His solution is to install ...
1
vote
1answer
278 views

How to copy files as Jenkins “post build” action if i don't have privileges to destination directory

I have the following users "architecture" : root access is disabled. admin user have access only to its home directory. Apache runs as root service (root is the only one that have access to ...
1
vote
2answers
269 views

Changing username but not home directory

Is it a bad idea to do usermod -l login-name old-name to change my username while leaving my home directory name intact? A few years ago my university changed my username, but since it didn't affect ...
1
vote
1answer
6k views

switching from user to root and revers (FreeBSD)

I want to make some modification with root and then with my user, in fact I want to install sudo and he give me the error in the first step: cd /usr/ports/security/sudo make install clean ...
1
vote
1answer
282 views

Verify that /etc/passwd has correct number of fields on each line?

I'm looking for an easy, portable way to validate the number of fields in /etc/passwd, /etc/shadow, /etc/group and /etc/master.passwd. This would run on FreeBSD, Linux and other Un*xes. pwck does ...
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 ...
5
votes
1answer
730 views

Why root's default shell is configured differently with other normal user account's default shell?

As I know, root's default shell is configured csh and normal user's default shell is sh in FreeBSD. And in Ubuntu, root is dash, normal user is bash. (refer: What's the Ubuntu's default shell?) Why ...
4
votes
2answers
217 views

How to control the time that users spend on

I need a solution that allows me to control the time that each user spend on the computer, excluding idle time (some kind of parental control). I've tried timekpr, but it doesn't work on Ubuntu 13.10. ...
4
votes
2answers
208 views

Understanding getlogin()

I think the previous iteration of this question was a little bit like a carpet bomb of questions, so that may have turned people off to it (to the point of almost being flagged for removal) so I'll ...
4
votes
2answers
718 views

How to set permissions in /sys/ permanent?

I'm starting X as a user and need to set my keyboard brightness in /sys/class/leds/asus\:\:kbd_backlight/brightness. The /sys/ directory gets recreated after reboot, so the permissions will reset too. ...
3
votes
2answers
715 views

A question about permissions of hierarchical directories

I have some directories, with following permissions: drwxr-xr-x 18 user1 root 4096 Oct 27 11:25 /home/test1/test2 drwxr-xr-x 24 user1 root 4096 Oct 21 08:38 /home/test1 drwxr-xr-x 492 root root 12288 ...
3
votes
1answer
2k views

User logged in by sftp does not show up in `w`

My server is Centos 5. I have a chroot environment set up with the following in my sshd_config Match group sftponly ForceCommand internal-sftp ChrootDirectory %h AllowTcpForwarding no ...
3
votes
3answers
2k views

Reset all groups to default

I recently set up some groups and users on my machine, and now I want to remove all those users and all those groups. Somewhat stupidly, I read on an Ubuntu forum or something like that that it was ...