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

learn more… | top users | synonyms

1
vote
3answers
70 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
82 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
82 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
0answers
15 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 ...
1
vote
1answer
66 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 ...
0
votes
1answer
73 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
92 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
73 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
88 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
44 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
25 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 ...
0
votes
1answer
85 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 ...
16
votes
3answers
855 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?
0
votes
0answers
42 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 ...
1
vote
2answers
72 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
1answer
46 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 ...
1
vote
0answers
36 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 ...
15
votes
1answer
316 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
18 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
105 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
44 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?
1
vote
3answers
115 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 ...
0
votes
2answers
141 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
1answer
79 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
47 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
3answers
88 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 ...
2
votes
1answer
39 views

How do I set a script to randomly print to a user's SSH session without setting it up as a Cron job?

I'm managing a small server at work that we use for Samba and SSH. I'd like to mess around with my coworkers by having a script run at random times of the day where it fetches a random quote ...
2
votes
1answer
65 views

Editing passwd files other than /etc/passwd

UNIX users are usually managed in the well-known passwd file format. The corresponding file usually resides at /etc/passwd. Since editing this file by hand is very inconvenient (mostly because of the ...
0
votes
2answers
170 views

List logged in users (name, terminal, logintime)

I'm trying to print a list of users, who are currently logged on a terminal. It should look like this: I only got this so far: I'm missing the Terminal and the Login time. How can I display ...
3
votes
1answer
104 views

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 ...
1
vote
3answers
79 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 ...
2
votes
1answer
82 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 ...
3
votes
3answers
634 views

sudoer file how to give a particular user full access to only certain file

I want to give a user full access to only certain files, can someone show me how to do that? For example, I want to modify the sudoer file to grant user access to only certain file. Thanks.
3
votes
1answer
99 views

Access a file in PHP through a symbolic link from a user that normally doesn't have permission

I have this website, where if the user submits a form, a python script is executed through a php page, and the python script creates a zip file and should offer it to the user for download through a ...
-1
votes
1answer
45 views

Allowed group can't access a folder [closed]

I've a weird problem on my linux machine, I've multiple users, we can say u1, u2, u3... who all belong to a group G. I have a group folder in /home who belong to one of these user (we'll say u1), and ...
0
votes
6answers
683 views

How can I find out which users are in a group within Linux?

I've recently been creating new users and assigning them to certain groups. I was wondering if there is a command that shows all the users assigned to a certain group? I have tried using the 'groups' ...
1
vote
0answers
69 views

Is this a Hacker? What to do?

My sites are hosted in a shared server at Hostgator. Server details: uname -a Linux xxxx.hostgator.com x.xx.x.x86_64 #1 SMP Fri May 1 18:21:30 CDT 2015 x86_64 x86_64 x86_64 GNU/Linux I was curious ...
2
votes
0answers
302 views

How could a user log in via tty

I rented this cloud server, and it is kind of attacked recently. I can see a suspicious user logged in via tty. leetom@S152:~$ last -x ayn1 ayn1 tty1 Wed Oct 28 18:59 - ...
3
votes
2answers
80 views

Creating a user having only access to folder & sub-folder which is present in other user of the same System

I have 2 users on my ubuntu system, User1 and User2. I have a directory(folder) in User1 as /home/User1/Software and I want to set this Software folder as home directory of User2 so that whenever ...
0
votes
2answers
33 views

User-dependent packages/files in /lib

I have setup a 2-seat computer. I start one X11 server using the computer's onboard graphics card (intel) and another in the dedicated one (nvidia). Everything runs fine, except opengl. Currently, ...
1
vote
1answer
76 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 ...
3
votes
1answer
58 views

chpasswd and openssl

I'm trying to pass an MD5 password to chpasswd but it doesn't seem to work. echo username:$(openssl passwd -1 -salt salt password) Then I try to pass this to chpasswd to change the password echo ...
2
votes
1answer
42 views

how to prevent access to other user with same user id (UID)

I have two Linux OS installed in two partitions in my system. However I have few usernames which are common in both partitions. For ex, I have user friend in both the OS. I have noticed that friend ...
2
votes
0answers
47 views

How to kill all vpns on switch user Mint 17.2

I'm using mint 17.2 cinnamon. I'm not particular about the method, just want it to stop all vpn connections (openvpn, listed in network manager) when I switch users or logout. nmcli doesnt provide a ...
9
votes
1answer
154 views

How can I create an account with a copy of the same home folder?

I have a 'user1' account with the home folder set up. I'd like to create a 'user2' account with a copy of the same home folder setup. Is it possible to do this?
3
votes
1answer
149 views

Why useradd -m doesn't fill created home dir with some defaults?

My motives: I want to create deployment script which prepare all system with just 1 click, and although learn Linux this way. So I don't want to use interactive utils like adduser (all interaction ...
3
votes
1answer
89 views

Why there is a group member field in both /etc/group and /etc/gshadow

I am learning more about Linux user and groups in depth and noticed fourth field in both /etc/gshadow/ and /etc/group are exactly same. Do they have any difference or is there any special reason why ...
0
votes
1answer
125 views

user exists when trying to add user to systemd-journal group.

I have been wanting to read systemd-journal by running/using journalctl -b . Now if I run it as a user I get the following :- $ journalctl -b Hint: You are currently not seeing messages from other ...
2
votes
4answers
181 views

Authentication failure on Amazon Linux

There is an authentication failure when I'm trying to enter password for any of my accounts. I am logged in using ssh to my AWS EC2 instance. After a while I checked the privileges to files that ...
1
vote
2answers
88 views

Which user is running the most processes?

My top looks like this: PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 6524 asjzdiwq 30 10 500m 41m 24m S 0.0 0.3 0:15.27 php-cgi 21274 asjzdiwq 30 ...