Tag Info

Hot answers tagged

17

First off, the respective man page snippets highlight the differences between the two commands and give some indication of what is going on. For adduser: adduser and addgroup add users and groups to the system according to command line options and configuration information in /etc/adduser.conf. They are friendlier front ends to the low level ...


12

Use su: su - alice sudo vim /etc/hosts From man su: The su command is used to become another user during a login session. Invoked without a username, su defaults to becoming the superuser. The optional argument - may be used to provide an environment similar to what the user would expect had the user logged in directly. For more ...


7

You can't have several users with the same UID. If they have the same UID, then they're the same user. What you have is multiple entries in the user database for the same user. That's possible in all unix variants I've seen. The user name determines which entry is used and thus which password, home directory and shell applies at login time. The first entry ...


7

You can read the source code; speaking of... I did it for you; it looks like it's from the ProcessInfo.cpp file. It's getting the usernames. Not only that /etc/passwd isn't a concern for you, anyone can read it. You might be worried though if it was trying to read /etc/shadow.


5

Using strace you can see what konsole is up to. $ strace -s 2000 -o konsole.log ... ... open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 3 fstat(3, {st_mode=S_IFREG|0644, st_size=2655, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f316d8fc000 read(3, ...


5

Put some text into the file ~/.plan and try finger again: $ finger yeti Login: yeti Name: yeti Directory: /arpa/tz/y/yeti Shell: /bin/ksh On since Wed Apr 2 15:24 (UTC) on pts/149 Mail last read Mon Mar 31 11:08 2014 (UTC) No Plan. $ echo Mwhuaaaaahahahahahahahahahaaaa... > ...


3

The reason (the only reason, as far as I know) to put users in a group of their own is to make umask 002 or umask 007 a sensible default. The umask is a mask for the default permissions of newly created files. The meaning of the digits are the same as in chmod; the first digit is for the user, the second for the group, and the third for others. If a bit is ...


3

For the same reason ls -l reads /etc/passwd, it is the data that associates UIDs with names. When ls calls stat(2) on a file it gets a numeric UID for the owner of the file. In order to display that as a human readable name, it needs to look it up in the only place that has those associations, /etc/passwd. For example a typical first line in /etc/passwd is ...


3

As already mentioned in the comments, since memory and CPU usage are negligible as you said, idle users won't hurt anyone. If you still want to get rid of them, you could automatically hunt down idle users and kick them off, either by e.g. a shell script you call in regular intervals via cron, or by setting ClientAliveInterval 1800 ClientAliveCountMax 0 ...


2

The documented way to create the mysql account is: groupadd mysql useradd -r -g mysql mysql Add the -m option if you want that account to be used as a login account, which looks to be the case. If you have full sudo access, you can grant sudo rights to that use with using sudo visudo and adding a line similar the one starting with your username and ...


1

I think what you're really looking for is this Q&A from the Wine HQ forums titled: [FAQ] [RFC] How can multiple users share an installed Wine application. === How can multiple users share an installed Wine application? === Wine is a per-user app; every user has their own Wine Registry, with the list of installed apps for that user. So one ...


1

Use chage -l to see a decoded interpretation of the aging information. The user name is expected as the argument. If you are interrogating your own account, no special privileges are requried. Otherwise use sudo chage -l someaccount. When an account is locked, the password field of /etc/shadow will begin with an exclamation point. The remaining ...


1

But I have another question. This command create /home directory but It is empty. Is some command to initialize /home for new user? The solution to the second question will also solve the first one. Your new user doesn't have all the default configuration files in it's home directory and therefore the new shell doesn't show a fancy prompt, etc... The ...


1

It was customary to add all users to group users, but that makes sharing files in a controlled way awkward (open up group permissions, everybody has access). As today a process can belong to a lot of groups at the time, just close access by giving each user her own group, and share files by adding explicit groups for this. Or (if available) use ACLs.



Only top voted, non community-wiki answers of a minimum length are eligible