Questions tagged [users]

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

1564 questions
201
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,489
72
votes
4 answers

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 exists. Is there a way that I can run this only if…
tarnfeld
  • 831
30
votes
3 answers

View list of users

I would like to see how many users are on my system. How could I view a list of all the users on the system?
ayy lmao
  • 781
16
votes
1 answer

How can I keep user acccounts consistent across multiple machines?

I now have a Raspberry Pi which runs Debian Wheezy. I have a couple machines (4 physical, 2 virtual) sitting here and I would like to unify the user accounts on those machines. The machines I run have the following Debian derivatives installed on…
13
votes
1 answer

Hyphen's availability in UNIX username

It is said that in UNIX and other alike systems, we can use hyphen for username in addition to Latin characters, numerics and underscore. On the other hand, the hyphen character is used as operator in so many programming languages. Are they…
Merzong
  • 233
12
votes
1 answer

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 the homedir of the deleted user, the new user now…
11
votes
5 answers

usermod -d /path user - User is currently logged in

good Day I want to make a change to a user on my CENTOS server. I want to change his default directory. When running the command: usermod -d /path_to_new_dir david terminal gives me the following User david is currently logged in I closed all ftp…
10
votes
3 answers

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?
Sam
  • 1,063
10
votes
1 answer

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 USERNAME tty1 :0 23:39 …
LanceBaynes
  • 40,135
  • 97
  • 255
  • 351
8
votes
2 answers

What is the difference between user name, display name and log-in name?

What is the difference between user name, display name and log-in name? What are the consequences of modifying each of them if a substantial difference holds? How do I modify these? I understand that usermod is relevant here, but interpreting its…
XavierStuvw
  • 1,119
5
votes
2 answers

How can I set default groups to put users in when creating them?

When I add an user under Debian Linux, I want to set her default group to a list of specific groups so she will get added to these groups when creating her account.
4
votes
4 answers

"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 2905 (:0) me pts/1 2013-08-29 01:45 …
nik.1
  • 345
4
votes
4 answers

How do I check what 'normal' users are there on the system?

I want to find out what 'normal' users are available on a system. By normal, I mean those who are manually created, not those like sshd or gdm.
tshepang
  • 65,642
4
votes
1 answer

What is a good way to change a group of users UIDs without usermod executing a time consuming chown on the user home directory?

My situation I inherited a collection of four Linux boxes where no care was taken to keep UIDs unique across systems. There are ~40 users and over 7TB of data owned collectively by those users. In order to have some sanity when NFS mounting /data…
golliher
  • 143
4
votes
3 answers

Is the user with UID 1 "daemon" on all systems?

I'm writing some testing code, and I'd like to know if it will be portable if it assumes that the user with UID 1 is named "daemon" on all Unix systems? EDIT: If not (the answer seems to be no), are there any UID/username mappings that are…
joshlf
  • 365
1
2 3