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

learn more… | top users | synonyms

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

Allow paswordless user to change to another passwordless user

I have two users dev and tomcat neither of them have a password. How can I allow dev 1 do su - tomcat without having him having to enter any credentials? 1 connects with ssh keyfile
-1
votes
1answer
22 views

Have I missed anything? user1 is not in the sudoers file [duplicate]

I've created a user on a server where there was only root as: # adduser user1 with a password. Then # su - user1 And then: $ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - ...
0
votes
0answers
24 views

Need to fix user access on centos

I screwed up user permission for my account "yann" on a centos 7 server. I would like to have that user to access rw on all folder under /home to manage the webserver folders. Each top level folder ...
1
vote
0answers
43 views

Changing password for Debian live

I have a hooks file, in the hooks folder, that looks like this: echo "root:rootpw" | chpasswd echo "user:userpw" | chpasswd After boot, Debian asks for user and password. When I type user along ...
1
vote
3answers
76 views

Is it safe to disable shell access to all users listed in /etc/passwd?

I have just read about how to disable shell access for users in Ubuntu in this post for security reasons. Is it safe to disable shell access to all users listed in /etc/passwd except the root:x:0:0 ...
3
votes
1answer
51 views

How to get number of opened file descriptors for user

I know about lsof and ls /proc/*/fd but none of them are atomic AFAIK. Because in the latter case I would need to get all pids for user and then filter by them and by that time some of the file ...
7
votes
2answers
12k views

What is nobody user and group?

On my server (Synology DS212) some files and folders have nobody nobody users and groups. What are the characteristics of this user and group? Who can write of read this file? How can I change it ? ...
1
vote
1answer
43 views

dconf fails when running X application from alternate user

In an effort to protect my personal files in my home directory, I am trying to run certain applications as an alternate user, but under the same graphical environment. I have enabled X permissions by ...
0
votes
0answers
17 views

What does 'addgroup' do compared to 'groupadd' [duplicate]

I am new to Linux and have started using Ubuntu. One thing I am having issues with is adding users due to the lack of easy to find information on the subject. I have noticed that there are two ...
1
vote
2answers
2k views

FreeBSD telnet does not take root login

I have just installed FreeBSD 8.1 as a VMWare host and can establish ipv4 connectivity to the instance and telnet through the virtual console. I have also uncommented the /etc/inetd.conf lines telnet ...
14
votes
3answers
20k views

Allow user1 to “su - user2” without password

I need to allow user martin to switch to user martin-test without password su - martin-test I think this can be configured in /etc/pam.d/su. There are already some lines in that file which can be ...
0
votes
1answer
34 views

What's the difference between lpasswd and passwd commands?

Studying the CentOS/RHEL sysadmin manual, I can't understand if there are or what are the differences between these commands.
20
votes
8answers
23k 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. What'...
9
votes
2answers
10k views

How can I create users with only remote ftp access on Linux server?

I'm running a Ubuntu 10.04 LTS server and I want to create users who can only access the server from FTP. What I did so far is: Install vsftpd Create new user with default login shell set to /bin/...
0
votes
0answers
49 views

Authentication required to edit Sudoers - User not listed

I made a small typo in my sudoers file, nothing a simple pkexec can't fix. The problem is that when I added my user with "adduser name" and added "name" to visudo, as well as the root and sudo groups:...
23
votes
6answers
22k 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 ...
1
vote
1answer
15 views

Error while logging in to a NIS server using the desktop GUI

When trying to login to a user account on an openSUSE based NIS server on a local network I receive the error message Cannot enter home directory. Using /. The following is the console error message ...
0
votes
2answers
41 views

Should I create should my own user with less privileges on a server (Digit. Ocean)?

I'm trying to deploy a website at Digital Ocean. I have the user root as the default. However, since it's root I believe I should create my own, normal user, shouldn't I? Nonetheless, in the ...
2
votes
2answers
30 views

User Admin - View Permissions when 750 is used for home

apologies if this question is caused by a fundamental misunderstanding. But as main admin of a server: I want to make it so that users cant see each others home folders. (so I chmod 750 the home ...
2
votes
2answers
5k views

Unable to su into an account: could not open session

in my Linux machine - red-hat I successfully to login to different users as the following su - userC [machine@Linux ~]$ pwd [machine@Linux ~]$ /Users/userC but only in one user I get the ...
-1
votes
1answer
47 views

Create a restricted user on Ubuntu

I need to grant guest SSH access to some user to review our server. He could: access only /opt/www/ folder (and subfolders) can list folders but can't read files content can't edit/create files ...
0
votes
1answer
42 views

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 ...
3
votes
2answers
73 views

Primary and secondary groups

So I've got the basics of primary and secondary groups down, but still have some questions I can't seem to find solid answers to: Can many users belong to the same primary group? Can one user's ...
0
votes
1answer
28 views

Moderate users homedirs - removing cleartext passwords [closed]

On one of Linux terminals I administrate, we allow users to write own scripts in bash/perl/python to enhance their administrative tasks. The problem with users is they don't always follow the rules. ...
1
vote
5answers
55 views

Show a user exists command

Is there a command that shows a user exists and is assigned to a group? I have just used the command usermod -a -G [GROUP] [NAME OF USER] and assigned a user to a group but, I was wondering if there ...
3
votes
1answer
217 views

Add user and set password using Ansible

I have created an Ansible playbook to create user and set password. But it is giving me an error ERROR: password is not a legal parameter of an Ansible Play Can someone help me with this? --- - ...
151
votes
8answers
238k 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 (...
-1
votes
1answer
202 views

pulseaudio run as root

I have Ubuntu 12.04 installed on my PC, recently I have edited /etc/passwd and changed user1:x:00:00:user1,,,:/home/user1:/bin/bash to give root permission to user1 and the system always need to ...
0
votes
1answer
76 views

Allow multiple users to “su” to multiple other users without password

This is similar to this question: Allow user1 to "su - user2" without password However, the solution only work for multiple users accessing "su"ing ONE user. #works fine :) 2 or more ...
0
votes
1answer
55 views

How to enter a user account and run commands from a shell script being run as root?

I am presently writing an automated install script for Arch Linux, to simplify the install process for myself (in case my current installation of Arch goes belly up and I can't fix it myself), but the ...
1
vote
1answer
34 views

users resource in Puppet not updating /etc/shadow

I have written a manifests using users resource as shown below node 'node2.example.com','node3.example.com'{ user { 'ash': ensure => 'present', managehome => 'true', comment => '...
1
vote
1answer
55 views

Is there a way to start always as a root?

I'm using Debian Wheezy, and I need to be always as a root. So I do the following every-time I restart the OS: $ sudo -i then startx. Is there a way to restart directly as a root every-time?
15
votes
5answers
40k 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 ...
1
vote
1answer
90 views

OOM-kill a process from user with highest memory consumption?

I have a multi-user system, where active users should get a fair share of the available memory. Can I set up Linux to kill a process of the user with the highest total memory consumption? This will ...
3
votes
1answer
87 views

Difference between logname and $LOGNAME

While reading about environment variables, the one I came across was LOGNAME, I'd like to know the difference between this variable and whatever the command logname returns - as both of them did ...
0
votes
1answer
26 views

vagrant user able to switch to any user without any password while running command “sudo su - <username>” but other users doesn't

I have installed two vagrant hosts on my machine. I login using user/pass: vagrant/vagrant Created a user user1. When I am in vagrant user and type below command : [vagrant@host1]sudo su - I am ...
1
vote
1answer
28 views

How I can change the home directory of the sftp server on MAC OS X?

I'm trying to set up SFTP's home directory on a MAC OS X Mavericks for user my_user. Now, it looks like: /Users/my_user (i got it with sftp> pwd command) but I want it be: /Users/my_user/Documents/...
0
votes
0answers
43 views

How to set correct user group rights to application running with java?

How to set correct user group rights to application using java? There is this scenario: 1) I have created user group and user (the same) - call it "groupgroup" 2) When I create a file with this ...
0
votes
0answers
43 views

home directory restriction

I am in serious doubt and need to implement to specific area Scenario A normal user , he can create file and folder in his home directory .he wouldn't not permitted to delete folder and file ...
1
vote
0answers
93 views

How can I switch from one user to another user inside a script?

.The issue is my id 'aaa' can read only the file name and not the contents inside it when I log in with my id "aaa". So to read the contents I have to switch to another user "bbb" which is having ...
5
votes
1answer
58k views

How can I create an SFTP user in CentOS?

I'd like to give temporary SFTP access to a support guy. How do I create an SFTP user? And how can I delete it once the job is done? Also, how do I specify a home directory for them? Can I prevent ...
0
votes
3answers
99 views

How to stop a user from seeing command line arguments?

We have a CI server application run as the build user. Any command with arguments run by the CI server is visible via ps. Although non-admin users do not have access to load a shell on the CI server, ...
0
votes
2answers
62 views

How to use user-systemctl as root?

I want to start a user service from my root shell without logging into the users shell. I have tried the following command, but it fails: #> su - username -c "systemctl --user" Failed to connect ...
2
votes
2answers
140 views

sudo tar changes extracted files ownership to unknown user

I am running this command: $ sudo tar xvzf nexus-latest-bundle.tar.gz The extracted files belong to an unknown (1001) user: drwxr-xr-x 8 1001 1001 4096 Dec 16 18:37 nexus-2.12.0-01 ...
1
vote
1answer
846 views

Creating a proFTPd user

I'm setting up a proFTPd server so I can upload files to my webserver, but I've never tried this before. I've installed proftpd, added a user with a home folder: /home/FTP-shared and added /bin/false ...
1
vote
0answers
48 views

Change default group for any new user

I'm wondering if you could change defaults groups for new users without having to specify all of them manually. I'm trying to harden my ArchLinux and there's a group (provided by Grsecurity) that is ...
24
votes
3answers
18k 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 ...
70
votes
5answers
22k 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 ...
0
votes
0answers
52 views

Xterm and User problem on Linux From Scratch

I made a linux system using LFS book 7.8 and then went to BLFS 7.8. I installed lxdm and xfce4 desktop. All the necessary drivers and libraries are installed. Now when I log in as root, I get no ...