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

learn more… | top users | synonyms

0
votes
0answers
459 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
73 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
134 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
1k 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
61 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
47 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
56 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 ...
3
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
422 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
42 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
46 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
22 views

adding text to titlebar in all root windows [closed]

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
141 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
78 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
121 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
117 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
90 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
95 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
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 ...
44
votes
2answers
26k 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
119 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
74 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
147 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
109 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
105 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
52 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
33 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
13k 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 ...
0
votes
1answer
135 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
879 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
99 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 Krusader)...
0
votes
0answers
50 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 ...
0
votes
1answer
53 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
40 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
325 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 further,...
1
vote
0answers
21 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
120 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
49 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
150 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
101 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
58 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
101 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
99 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 (...