Questions tagged [users]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

“who/w” command fails to list active user logged in from SSH client session

I (logged in as "user1", has root access) was following this to experiment with kicking a client ssh session logged in as "user2" (has no root access), connected from the same network from a laptop. ...
1
vote
0answers
16 views

`Last` command not working or am I not logged in?

Last command does not show me as logged in. What should I do? I want to run the last command to see all users logged in on a specific date, but the output of last is wtmp begins followed by a date.
0
votes
0answers
10 views

Printing the names of the users that logged in on a specific date

Every last command that I write outputs the same thing: wtmmp begins Sat Mar 7 21:30:03 2020. I have tried with different command options, but the output is the same every time. Also, I have used ...
0
votes
1answer
12 views

Switching user inside tmux session: Cannot attach to other tmux server

I have this scenario on a server userA (uid 1000) logs in over SSH and starts a tmux server and some sessions userB (uid 1001) logs in over SSH and runs su userA to become userA inside of a tmux ...
0
votes
1answer
25 views

Create startup process that requires both root and other user

I'm trying to create a service that starts a process. I want the startup of the process to be able to do a few commands as root and then run the rest of the process as a less privileged non-human ...
0
votes
0answers
36 views

sudo -u “user” --login vs. su “user” --login

I think there is slightly differencess between sudo -u "user" --login and su "user" --login For instance, I create a user with useradd -m user and ran passwd -e which means the user user's ...
0
votes
0answers
32 views

Script to delete multiple users

I want to delete all users except 2 of them. First, I put all the existing usernames in a file with ls /home > usernames and manually delete the users I want to keep. Then I create this simple ...
0
votes
1answer
19 views

Disable local user PAM, enable root user with LDAP

I am trying to setup a Linux machine with LDAP authentication and root account enabled. There is no issue with the LDAP server and everything works fine. I wanted to disable local users so I tried ...
0
votes
1answer
89 views

How to create a linux user where sudo promps for the root password and not current user

I created a new user with adduser but when I tried to sudo from his account I got xxxx * is not in the sudoers file. This incident will be reported.. So I started tampering with the visudo command... ...
0
votes
2answers
25 views

Remove user from group

I try to remove a user from the group ftp-users because I use the user to upload files to my webserver via my Netbeans IDE and it always changes the group of modified or new created files to ftp-users ...
0
votes
0answers
33 views

How to create a “View” user in Ubuntu? or live custom image?

@Edited Hello everybody, I'm trying to build a small remote access solution using a computer with Ubuntu 18.04 installed and the objective is to create a solution plug-and-play, to access remote ...
0
votes
0answers
16 views

Systemd doesn't use the specified user in the app.service to run the service; what could be wrong?

I have a .Net Core 3 app that I want to run as a system service: [Unit] Description=app-prod [Service] WorkingDirectory=/var/www/app-prod ExecStart=/usr/bin/dotnet /var/www/app-prod/app Restart=...
0
votes
0answers
5 views

Is it possible to define different permission for different service by FreeIPA?

Now using Red Hat Identity Management as IPA solution. Will serve some products such as Jenkins, Github, Artifactory, etc. Now want to create different permission to different users for different ...
0
votes
1answer
21 views

What's the difference between locking and expiring a user account?

usermod -e 1 *username* will have the effect of expiring a user account but usermod - L *username* will lock the said account. Are there any specific differences between the two? In my opinion, ...
0
votes
1answer
27 views

Give a “non-user” account access to ssh

I'm running a python application (a monitor) called Tautulli. This application are running under the user tautulli. Now, the app is performing different functions depending on other stuff. The ...
0
votes
2answers
16 views

How do I ensure a user has a home directory at the default location of /home/new-user and uses the default shell /bin/bash

I'm trying to create a new user which I understand you use useradd [filename] Then I need to ensure this user has a home directory at a default location of /home/filename and uses the default shell /...
-1
votes
1answer
44 views

How to have two users with ssh access [closed]

How can I have access for two users via ssh. Example: I have two users (not root), user1 and user2. How can I access these two users by SSH. I don't want to login to one and switch to other like su ...
0
votes
1answer
17 views

Where customize prompt for all existing and new users?

I'm using Ubuntu 18.04. To customize the prompt of an user I know that I have to edit ~/.bashrc. But to override the ~/.bashrc of all existing users which file should I edit on /etc ? And if I want ...
0
votes
0answers
18 views

Xubuntu (12.04) can only log in as root

Good evening ladies and gentlemen. I am having an issue with the above OS- I tried to boot from a windows drive via a USB cable this morning, and it crippled my linux install somehow- managed to ...
0
votes
2answers
100 views

Is there a GUI to edit/add users and groups

Is there a graphical tool that shows (edits) all users and groups on the system, so that one can avoid editing /etc/passwd and /etc/group directly? GNOME Settings (gnome-control-center) Users view ...
0
votes
0answers
47 views

Getting strange error when trying to login through “su user”

When I'm login as root, all is fine, but when I'm trying to log in directly with user or "su username" command I'm getting this. Does anyone have thoughts about why this might happen? (1:43)# su ...
-1
votes
2answers
483 views

bash: adduser: command not found [Debian Buster]

Question: What is the most-ideal way to add new users in Debian? adduser appears to be missing on my system, any tips? Log: bash: adduser: command not found Edit: adduser does appear to be ...
0
votes
0answers
16 views

Does Samba have anything similar to /shadow/ sp_inact?

I am running Samba with slapd and I was wondering if there is any function similar to sp_inact — days after password expires that account is considered inactive and disabled. I need to disable ...
0
votes
3answers
79 views

Creating a “sub-user” account/environment

I'm working on an old(ish) SLES GNU/Linux machine on which I don't have root, nor do I have a user account of my own: Multiple people use the same user account (often at once). This is "necessary", ...
1
vote
0answers
17 views

Access to an i2c device used by the kernel, from user space

On my ARM board there's an I2C PMIC used by the kernel: # i2cdetect -r 1 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- ...
1
vote
1answer
131 views

setuid not working [duplicate]

I was trying to learn how setuid works. So I made a dummy program which just prints the current user: #include<bits/stdc++.h> using namespace std; int main(){ cout << system("id -...
0
votes
0answers
39 views

Why am I getting 'unable to create directory - Permission denied' error while using a software running as another user?

I'm trying to run Brave Browser from user1 as user2 with the su command: su user2 /usr/bin/brave-browser The config files of the browser are stored in the config folder of user2. Also, I edited the ...
-2
votes
1answer
53 views

Why can usermod not modify newly created user? “User does not exist”

Please see the commands I have run trying to modify a user that was just created. # useradd temp # usermod -R /home/temp temp usermod: user 'temp' does not exist The above is odd, so I did a few ...
0
votes
3answers
40 views

Is there a way to script a check to see how long someone has been logged into a server?

I'm an absolute scripting novice but I've been asked to create a script that checks how long a user has been logged in to a Linux server and if it's longer than, let's say, 5 hours, it would need an ...
2
votes
1answer
76 views

script to shutdown server if no active users

I want to write a bash script that will run with cron every 5 minutes that will check if there's any active users logged in and if no active users are logged in, it will shutdown. I've come up with ...
2
votes
1answer
27 views

Block commands at certain times of the day

I was wondering if anyone knew of a way to block certain commands from particular users/groups on any Linux distro (or most, if not all distros) at certain times of the day. What I would ideally like ...
0
votes
0answers
14 views

CentOS 7 - ChrootDirectory lock sftp-only users into certain folders

I have several users who connect via SFTP only to drop off and collect files and we need to lock each user into their own folder structure without access to the rest of the system. So if we have "...
0
votes
1answer
18 views

Making use of second (ext3) hard drive

I have two hard drives. Both are FireCudas, "half ssd, half hdd". One has 1TB of space and the other, with my Manjaro on it, has 480GB. Up until now (for 2 years) i have not used the second drive, ...
3
votes
1answer
60 views

Why does /etc/shadow uses user name instead of uid?

/etc/shadow contains the username, but not the uid. Is there a specific reason, why a char * field was chosen over an int? For direct username->password check this might be quicker, but for ...
1
vote
2answers
37 views

Display the number of registered users

How can I display the number of registered users on the system who have their home directory in /home and simultaneously have Bash Shell as the command interpreter?
0
votes
0answers
18 views

User environment separation clarification

I need to have multiple environment on my laptop and I want to have them separated in the way that one user action can not break another user environment and so that the users can use different ...
0
votes
1answer
29 views

How to switch to another user on the terminal in SLES 12?

I created a user (useradd -d /home/newuser -c "My new user" -s /bin/true newuser), set a password (su newuser), and want to work under this username. But I cannot switch to this user. No error ...
0
votes
0answers
29 views

How to get a user's account picture in Linux?

How can I get a user's login image or avatar or 'dp' in Linux? A lot of similar questions on SO provide answer for Windows,not for Linux. [Im on Debian 10, GNOME DE, but prefer a general solution if ...
1
vote
0answers
31 views

Why does other user stay logged in on seat0 and prevent me to hibernate?

Using openSUSE Leap 15.1 with KDE. I log in as user1 then switch to user2 and log that on off again. Hibernating as user1 was until recently no problem (if I logged off user2). But now I get this: ...
0
votes
1answer
54 views

reset uid counter

In freshly installed system UID usually starts with 1000 while creating new user using command useradd dummy id -u dummy # 1000 which can be modified by -u, --uid option useradd --uid 9000 ...
2
votes
2answers
265 views

disable login by editing /etc/password file

I am assigned to generate a script that can disable password login for ssh service. Knowing that I can perform this action by editing /etc/sshd_config file, but my mentor mentioned the file I should ...
0
votes
1answer
27 views

Can't rsync to www-data owned directory

I have a ubuntu 18.04 server running on GCP (nginx+php7). I've setup a directory /var/www/mysite.com which is drwxr-xr-x www-data:www-data. public_html/ is also drwxr-xr-x www-data:www-data. I'm ...
0
votes
0answers
23 views

Why cant I change this systemd units user and group?

This was installed from a deb on ubuntu 19.04 and worked fine but was running as root which I wanted to change. Here is the unit file systemctl cat edvrserver.service # /run/systemd/generator.late/...
1
vote
2answers
194 views

Difference between expired account and inactive account

After a command like: $ usermod -e <yesterday> -f <tomorrow> bea Bea's account will be expired, but still active (until tomorrow). What's the difference? What could happen yesterday ...
0
votes
2answers
43 views

Ubuntu 18.04.3 LTS Users

I'm having a hard time figuring out how to do this. I'm a root user and wanted to create another user, who mainly access through FTP and needs to have permission to write, delete and add files. What'...
6
votes
0answers
256 views

How can I make a device available inside a systemd-nspawn container with user namespacing?

I would like to mount an encrypted image file using cryptsetup inside a systemd-nspawn container. However, I get this error message: [root@container ~]# echo $key | cryptsetup -d - open luks.img luks ...
-1
votes
2answers
74 views

What BASH command can match a user who filled up considerable disk space (around 30%) in /opt?

Sometimes we get into a problem where are unable to figure out what caused the disk to be filled. Therefore, if we have a BASH one liner/script which can catch the uid of the users and pid with time, ...
0
votes
1answer
66 views

How to force all local users to change their password

I'm Currently following RHCSA. Can you guys tell me way to force all local users to change their password in next login?
0
votes
0answers
52 views

Can gpasswd add non-local users to local group?

We use CentrifyDC in our organization. I have a local group to which I want to add AD users. # getent passwd aduser aduser:x:12345:12345:AD User:/home/aduser:/bin/bash As illustrated, getent ...
0
votes
1answer
25 views

Give the permissions to modify files only for the owner in a specific directory

I have 4 users: A, B, C, D and a directory : folder10; I want to give A and B acces to folder 10, and whenever someone create a file in this folder, he will be the only one who can modify it, the ...

1
2 3 4 5
26