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

learn more… | top users | synonyms

1
vote
5answers
50 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
133 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? --- - ...
147
votes
9answers
230k 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 ...
0
votes
1answer
74 views

Is AWS AMI 'apache' equivalent to Ubuntu 'www-data'?

I'm trying to convert a Chef script thats used in AWS OpsWorks for an Ubuntu system to a script I can use with my AWS OpsWorks setup for my Amazon Linux AMI installation. Their Ubuntu Setup: sudo ...
-1
votes
1answer
122 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
65 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
49 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
33 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
52 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
38k 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
71 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
61 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
24 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
26 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: ...
0
votes
0answers
35 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
39 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
81 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
56k 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
87 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
41 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
99 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
834 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
45 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 ...
23
votes
3answers
17k 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 ...
69
votes
5answers
21k 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
51 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 ...
0
votes
2answers
263 views

Does a user have permissions to write outside /home/userDir?

Does a normal* user have permissions to write anywhere else than his own home dir? (no sudo and those privilege escalation tools) I say normal because I do not know more categories than root and ...
1
vote
3answers
82 views

Audit simultaneous logins in AIX

We are in a banking enviornment and our core system is based on AIX. Multiple users are logging in with the same userID at the same time using SSH. I know I can see who SSHed into the system from ...
0
votes
0answers
438 views

can't find my user name in /etc/passwd nor name of my initial group in /etc/group

Here is what i get: [zehu@danville ~]$ groups apl vboxusers [zehu@danville ~]$ [zehu@danville ~]$ grep zehu /etc/passwd [zehu@danville ~]$ [zehu@danville ~]$ grep apl /etc/group [zehu@danville ...
0
votes
0answers
50 views

Switching Users in Centos 7 gui

I got CentOS 7 installed with gnome desktop. During set up I set a password for the admin account, and also set guest with no password and without admin rights. When i rebooted and went to login the ...
0
votes
0answers
28 views

changing file and folder permissions for network shares

I am fairly new to linux but used it before and know bit about the command line etc... I am trying to set up a folder in which everyone has their own username and password with each folder, I have ...
2
votes
2answers
122 views

Limit a user to his own home directory

I have a user who can even use sudo. I want to limit his access to his home directory only. nothing else at all. I created a group ' limited ' and moved him to this group. Now What? How shall I ...
15
votes
3answers
32k 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 ...
0
votes
3answers
320 views

How to change the Home directory of the currently logged In user

I am currently logged in into a CentOS server and I would like to change my home directory from /home/myuserName/ to /var/www/html/ I tried the below command : > sudo usermod -d /var/www/html ...
0
votes
1answer
60 views

How can I add all my groups to a different user in bash?

I've got a user named foo. I'd like foo to have all the same group memberships that I do. I thought I was close, with this: sudo usermod -a -G $(id -Gn | tr " " ",") node4 The id piped to tr is ...
0
votes
2answers
45 views

How to count how many files belong to each user/group combination?

How to count how many files belong to each user/group combination? I need to do this for each user/group combination that exists, in each of the directory trees /etc, /usr, and /var.
0
votes
1answer
41 views

Change user passwd with UID

Is it possible to change a user's password by UID? [root@CentOS7 ~]# id usera uid=1000(usera) gid=1000(usera) groups=1000(usera),10(wheel) [root@CentOS7 ~]# man passwd [root@CentOS7 ~]# passwd 1000 ...
2
votes
2answers
3k views

Allow all group members to create directories and files

There are 2 users sftp_user apache Both users belong to the updaters group as well as other groups. New directories and files are created in the /updates/ directory. drwxrwsr-x 8 sftp ...
2
votes
2answers
319 views

Bash cannot act as nobody and nogroup?

I have a log file that was created by nobody:nogroup, which is activity being logged to, I wanted to emulate adding a message to that log file. My first thought was to: $ sudo su nobody This account ...
2
votes
3answers
40 views

Users withouth password (at least for login)

I have a desktop pc with 3 users on it. (Linux Mint 17 Rafaela) These 3 users are mine, I use this configuration to isolate my work files and settings from the university files and my personal stuff. ...
1
vote
1answer
38 views

changing $HOME directory name

I'm Using Arch Linux + Xfce4 (Edit: running as VBox OS guest) and I wanted to change a username and it's home directory accordingly. I followed these steps as root: 1.Renamed the home directory # mv ...
2
votes
0answers
17 views

adding text to titlebar in all root windows

When a window is opended with root priveleges, I want to display some text in the titlebar to inform the user that he/she is root in that particular instance. I'm currently using the MATE desktop ...
5
votes
3answers
2k views

Precedence of user and group owner in file permissions

I just ran into something unexpected (for me) regarding file permissions on Linux (Arch Linux). Basically I have: userX in groupX fileX userX:groupX ---rwx---- What puzzles me: I cannot perform ...
5
votes
4answers
6k views

Whoami: cannot find name for user id 0

When I run whoami it says: whoami: cannot find name for user id 0 My /etc/passwd file looks like this: root::0:0:root:/root:/bin/bash
1
vote
1answer
125 views

Is there a whoami to find the current group I'm logged in as?

I'm trying to find my current logged in group without wanting to use newgrp to switch.
5
votes
5answers
2k views

Extract dates from /etc/shadow

The file /etc/shadow has a couple date fields that are expressed as the number of days since Jan 1, 1970. Is there an easy way using to get a list of users and the calendar date of the last password ...
1
vote
0answers
72 views

Proper permissions on SFTP upload and download subdirectories in a user's home directory?

I have a server running OpenSSH. I've setup an SFTP server that users can log into. I have created user userName with a folder at /sftp/userName with permissions of 555 and owner root. This folder has ...
3
votes
1answer
109 views

What is the purpose of the 'ssh' group?

There is a system user named sshd on my system, and a group named ssh: $ cat /etc/passwd | grep ssh sshd:x:120:65534::/var/run/sshd:/usr/sbin/nologin $ cat /etc/group | grep ssh ssh:x:117: My guess ...
-2
votes
2answers
98 views

Delete all users and groups except root in debian

I would like to delete all users present by default on my Debian, but I wonder what can happen if I delete them... I am learning linux so I want to clean everything except root and play around with ...
1
vote
1answer
80 views

How to fully manage users and groups with web GUI and create templates for new users?

I currently have an Ubuntu server with 10-15 users. I have some CLI experience, but I am not a fully CLI ninja. I currently have some groups made in the CLI to manage different groups of users. In ...