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

learn more… | top users | synonyms

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
38 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
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 ...
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
30 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 ...
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.
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
52 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
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 ...
1
vote
1answer
29 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
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 ...
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?
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 ...
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 ...
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
73 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?
1
vote
3answers
65 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
58 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
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
3answers
68 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
35 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
45 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
81 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
43 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
2answers
48 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
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 ...
3
votes
3answers
243 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
70 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
27 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 ...
1
vote
6answers
226 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
174 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
50 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
32 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, ...