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

learn more… | top users | synonyms

2
votes
2answers
42 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 ...
14
votes
3answers
29k 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
38 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
49 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
31 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
0answers
39 views

Unable to log in to any user accounts on a fresh install of Arch linux

Has anyone run into the issue of not being able to log into their root account after a fresh install of Arch Linux? I have tried setting the root password twice with the passwd command within the ...
0
votes
2answers
9k views

vsftp user authentication problems

I configured my ftp user's home dir to /var/www and set a password but I cannot login with ftp 127.0.0.1, it keep giving me 530 Login incorrect. Why is this? I'm sure I have typed the password right. ...
0
votes
1answer
26 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
128 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 ...
1
vote
3answers
35 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
31 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 ...
1
vote
0answers
14 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
1k 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
5k 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
91 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
20 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 ...
1
vote
3answers
47 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
38 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
54 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
30 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 ...
1
vote
1answer
31 views

Security - Runing Daemon, program as root or user vs sudo su

I have some questions about Linux security: Running a process as root is a big mistake (root has too much power + a program get too much permissions in the system). I always ran processes as a user ...
1
vote
0answers
12 views

Need Help to Solve Screenlock Bypass Issue for Expired User Account

I have created a script that I deploy to my children's computers via Salt. The script implements allowed working hours and has worked well, but one of my children have found a way of bypassing this ...
34
votes
2answers
20k 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 ...
0
votes
2answers
95 views

how to get info about the user and the processes he is running in systemd?

If I wanted to know who is logged in since when and what are the processes currently running under his control, how can I do that in systemd?
0
votes
1answer
67 views

How can I reveal the real name of the users online (with university IDs)?

In the terminal, how can I reveal the real name of the users online (with university IDs)? getent?
1
vote
1answer
60 views

logrotate fails to rotate logs: error setting owner

Recently I've noticed that logrotate does not rotate my logs. user1@host:~$ /usr/sbin/logrotate /home/user1/logrotate.conf -v gives me an error: error: error setting owner of /home/logs/mylog.log.1 ...
-5
votes
2answers
44 views

How can I create multiple users in Unix?

Someone tell me a way to create multiple users in UNIX. If I want to write a script, how can I do it? Any advice?
1
vote
1answer
57 views

How to add users to Linux through a shell script

The shell script that I have to write has to create new users and automatically assign them to groups. This is my code so far: echo -n "Enter the username: " read text useradd $text I was able to ...
0
votes
2answers
30 views

FreeBSD create user without utility?

I have a user that I created via the pw utility on FreeBSD. The full command I used was: pw add user example -s /usr/local/scripts/example.sh -w none The user can login as example without requiring ...
0
votes
0answers
12 views

Supervisord fails to run a program

I've a program that I try to run with supervisord but keep failing. The following is supervisord configuration: $ cat /etc/supervisor/conf.d/application.conf [program:application-web-1] command=env ...
2
votes
2answers
8k views

assigning read/write privileges for a folder to a user in CentOS 7

I am logged into a CentOS 7 server as root. I created a folder /somefolder. I want someusername to be able to write to that folder via scp from a remote computer. What command should I run so that ...
1
vote
1answer
34 views

Home directory for system users

What is the best practice when setting the home directory of system users that don't have a specific working directory. I often have to create users to run specific binaries or scripts. Supposing ...
15
votes
3answers
821 views

How to get HOME, given USER?

I have an USER variable in my script, and I want to see his HOME path based on the USER variable. How can I do that?
1
vote
2answers
44 views

Specific user account for Apache in the /var/www directory

I will explain as best I can. On my previous server my friend set up a user called webslave. This user's home directory was /var/www. When I would use FISH protocol to transfer files (using ...
0
votes
0answers
29 views

Transfer session between computers

At my uni, we use ubuntu on our lab machines, and we can log in anywhere on the network, and ssh into any lab machine. Is it possible to be logged into one machine then decide to transfer the current ...
8
votes
5answers
4k views

Can I allow a non-root user to log in when /etc/nologin exists?

Suppose a non-root user with sudo privileges executes a delayed shutdown (shutdown +10 or whatever) and logs out. Then, before the shutdown occurs, he wants to log back in and cancel the shutdown. The ...
1
vote
1answer
34 views

Cannot edit visudo

I have to give my user permission to run sudo. I am using CentOs # uname -a Linux lab-hv1-centos1 3.10.0-229.el7.x86_64 #1 SMP Fri Mar 6 11:36:42 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux and have ...
2
votes
0answers
30 views

Listing ALL logged-in users. Also the ones not using a shell

We are working with an application that logs in to a Linux server (Ubuntu server 14.04) and just requests a reverse tunnel. Before we did this with Plink. And when the client was running Plink, I ...
14
votes
1answer
299 views

Why does ArchLinux keep some users/groups after package uninstallation?

I've noticed that after uninstalling the postgresql package in ArchLinux the postgres user and group are not removed automatically. The same is true for some other packages. Investigating this ...
1
vote
0answers
11 views

What does UniqueID do on Mac OS X?

Scripts to create a new user on OSX typically use the command dscl to set a user attribute UniqueID. What does UniqueID do and how should I determine what to set it to?
1
vote
1answer
74 views

Ghost user? A user doesn't show up on the login screen nor in “users” command

There is a user in my (Mint 17) system that I can log into by typing the name and the password. But it doesn't show up in any list of users I can think of, be it the login screen or the output of ...
1
vote
1answer
39 views

How to add users and add them to groups in linux bash

sudo adduser –G {teacher} user sudo adduser –G {teacher} user How could I fix this if user is an input variable and teacher is an existing group?
0
votes
2answers
59 views

Creating an automated idle process kill script

I would like to implement a solution to a specific instance of the generic problem wherein idle users tie up resources. I know the user list can be retrieved with 'w', the associated PID with 'ps', ...
1
vote
3answers
66 views

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 ...
1
vote
1answer
53 views

How to switch a group without asking for a password?

In linux, there's two files where group definitions are specified. One of them is /etc/group and the other is /etc/gshadow. I want my regular user to be able to switch a group while starting a process ...
1
vote
1answer
31 views

Chdir fails even though the user has a home directory assigned

I'm facing this problem - when I ssh to the server, the user is authenticated correctly, but then the connection is closed with: Could not chdir to home directory /home/blazej: No such file or ...
2
votes
1answer
41 views

Can't send local mail message between users on linux

In http://unix.stackexchange.com/a/21336/99621 it says that if you do echo 'body' | mail -s 'subject' myuser It will send a mail message to the myuser linux account on the local system that this ...
2
votes
3answers
69 views

What does it mean a ! before the username field in /etc/passwd?

After doing some googling I could not find why in the /etc/passwd shows a ! at the beginning of the line. It looks like this: !user:x:0:0:user:/home/user:/bin/bash any ideas? my only guess is ...