Questions tagged [su]

Substitute User command

Filter by
Sorted by
Tagged with
0 votes
1 answer
100 views

su: failed to execute 1 sudo dpkg-reconfigure locales: No such file or directory

I was configuring a linux server and after an apt upgrade this message came up whenever I try to change the user to root. If I do sudo su -, su -, sudo -i I cannot change user because it says that su: ...
nect's user avatar
  • 1
0 votes
1 answer
140 views

After run sudo and/or su or su - command, the command prompt not loaded, however the switch user is successful

I saw a maybe similar thread but not sure there the issue is the same: su command not responding? I have an Ubuntu 20.04 LTS baremetal server. After run sudo and/or su or su - command, the command ...
Badb0y's user avatar
  • 115
3 votes
0 answers
414 views

Unable to su or ssh as anyone but root on CentOS 7

I seem to be unable to ssh or su as a local user on my CentOS 7 machine as of today. $ adduser ndejay $ passwd ndejay Changing password for user ndejay. New password: Retype new password: $ su ndejay ...
Nicolas De Jay's user avatar
1 vote
4 answers
4k views

Execute root commands through ssh user

my goal is to execute commands as root user from another linux host through ssh. The Problem is: The environment doesnt allow to access the root user directly. The manual way, which works, is to ...
Troubadix's user avatar
1 vote
2 answers
411 views

How do I run sudo commands with a system user?

I want to run a minecraft server in Docker, so I started following this guide. In the guide, it is advised to create a system user with a home directory (/opt/minecraft), but without a password (you ...
Mr Baloon's user avatar
  • 111
1 vote
1 answer
721 views

Can't run command under /bin/false user

Centos 8. There is snowuser: [snowuser@snowcannon-01 ~]$ cat /etc/passwd | grep snowuser snowuser:x:1002:1002::/home/snowuser:/bin/bash [snowuser@snowcannon-01 ~]$ groups snowuser wheel There ...
Lesha Pipiev's user avatar
0 votes
0 answers
521 views

Tenable su+sudo and selinux

My Not-A-Sysadmin-Boss wants me to explain this but I can't really find an answer? When using TENABLE SC to scan a RHEL7 system the account used to do the scan connects via ssh then uses sudo to ...
user1548815's user avatar
1 vote
3 answers
3k views

Ubuntu 20.04: su command bash-autocomplete stopped working

I am using Ubuntu 20.04. The su autocomplete stopped working. For example when I type: su TabTab It lists the files and directories of the current directory, where as it should list the available ...
Ajaib Singh's user avatar
0 votes
1 answer
1k views

How to restrict users switching from su command

How can I restrict users switching by su command? Suppose there are 3 users (root,user1 and user2) only root and user1 can switch by using su command. root or user1 should not be able to switch to ...
Prabath Lasantha's user avatar
3 votes
0 answers
403 views

Why su command takes to long in nested Debian LXD containers?

I observed that the command su takes too long (30 seconds) when it is executed in a LXD Debian container that is nested into an Ubuntu LXD container. This overhead does not occur Debian containers ...
Daniel Hernández's user avatar
0 votes
1 answer
125 views

Let one user become another user without a password?

On (most) Linux systems, we can let a specific user su into anyone they want by placing him in the wheel group and making some settings in /etc/pam.d/su. I want to do something more limited: I want to ...
einpoklum's user avatar
  • 1,722
-2 votes
2 answers
62 views

How to protect from coworkers [closed]

Hello how to protect linux account form other administrators(coworkers) in company who can use your account to steal data and point a police that you are the guy who steal data from company. if ...
Robert Fil's user avatar
0 votes
1 answer
256 views

Having trouble switching to user using the "su - lfs" command

I am trying to do linux from scratch. I was able to create the user to manage everything (named lfs) and I was able to login using this command. I then powercycled my computer and I am no longer able ...
Jeremy Pixton's user avatar
1 vote
2 answers
1k views

su: authentication failure (password correct, setup worked before, nothing changed)

Most of the issues I found are related to new installs, root password being disabled by default, or things falling apart after some changes. None of that applies here: in my case nothing was changed, ...
ᴍᴇʜᴏᴠ's user avatar
0 votes
0 answers
1k views

Can not su - root. su: incorrect password

I am trying to switch to root user using the su command. I am getting the following error $ su - root Password: su: incorrect password I checked the /var/log/messages and found the following: ...
AndresM's user avatar
  • 39
1 vote
1 answer
243 views

Is this user root or not

I see the following in /var/log/auth.log (system is current Ubuntu). myserver su[14993]: illegal option minimum_uid=1000 myserver su[14993]: Successful su for jeanbon by root myserver su[14993]: + ???...
dargaud's user avatar
  • 203
0 votes
2 answers
482 views

Switching to a "role" account, using `sudo` and `ssh` agent forwarding later on – possible?

I want to create "role" accounts for several admin tasks that don't usually require root permissions. For example, consider a www-admin user maintaining files in /var/www. It seems to me that this is ...
mp_de's user avatar
  • 11
8 votes
2 answers
14k views

How to switch user given a UID?

I only know the UID of a user, is it possible to switch user using UID in linux distribution like we do using username like su -u someuser?
Vishrant's user avatar
  • 243
1 vote
0 answers
286 views

Create a screen. Run said screen as a user. Detach

I'm essentially trying to combo Create screen and run command without attaching and another answer that allowed me to run a script as another user. I want to SSH from Server 1 -> Server 2 and run a ...
sfxworks's user avatar
  • 157
1 vote
1 answer
2k views

pam_tally2 incrememts before password for su attempts

There is a similar behavior here but I believe this is a different underlying cause, or at least requires a different solution since this failure isn't due to SSH keys. Our company is undergoing a ...
devLP's user avatar
  • 11
0 votes
0 answers
319 views

Can you disable su for certain users logged in via ssh?

Basically, I'm running a Mac Mini as a server, and I'm trying to close some security holes. My server has 3 users: admin, git, and server. Each user has public key authentication enabled, while only ...
Next-Door Tech's user avatar
0 votes
1 answer
2k views

Sudo not working. How to reset root password Ec2 (AWS)

I installed a SSL certificated the day before. Today I wanted to log in to the server. When I try to "sudo" it gives me the following error message: sudo: unable to stat /etc/sudoers: No such file or ...
Matthias Reichl's user avatar
-4 votes
2 answers
2k views

Restricting su access

I am using rhel7.2 in our envirement.I do not want any user on system to "su" to 2 specific users say "user3 and user4".But "user3 and user4" can "su" to any user in the system. Let me explain my ...
Ankush kalra's user avatar
1 vote
0 answers
6k views

su: cannot set groups: Operation not permitted

I'm trying to get root access for a user who is initially logged in from a console. I have root access from another method. User does not have a username, so sudo is not an option. Running su returns ...
Kidburla's user avatar
  • 131
0 votes
1 answer
276 views

User login without passwords

We have multiple users accounts with /bin/bash shell allocated to them. An another application "su" to these accounts for controlling their service statuses and monitoring purposes. Passwords for ...
Aso'K's user avatar
  • 21
0 votes
1 answer
1k views

RHEL7 - su - command error logging location

I am trying to understand if there is any logging happening for this command in any log file: $ su - user1 su: user user1 does not exist I checked /var/log/messages, /var/log/secure and /var/log/...
sb9's user avatar
  • 103
5 votes
1 answer
8k views

How to automatically switch to home directory when switching user?

When i ssh to my ubuntu server, i get logged in to my user's home folder. But when i do su otheruser and enter the password, i get logged in as the otheruser but the home directory stays for the ...
user2707590's user avatar
3 votes
2 answers
4k views

can't login as root on a remote Redhat Server

I am currently working on a remote RedHat server(RHEL version 6.7 x86_64). I can login as a user by using userID and password which is provided by the server administrator. But when I try to login as ...
niraj's user avatar
  • 31
-1 votes
1 answer
2k views

Allow winscp access, restrict direct shell access, allow su - for Linux server local user

Is it possible to restrict access for a particular local user in Linux, with below mentioned conditions: User should have no direct shell access User should be able to login with command "su -" from ...
Arun Krishnan's user avatar
0 votes
1 answer
64 views

How can I get su screen PID on Debian8?

I want to run this command by another user (so with su): screen -ALmdS server_mta ./mta-server -n It's okay: su - server_2 -c 'screen -ALmdS server_mta ./mta-server -n But I need the PID of screen, ...
Maróthy Zsolt's user avatar
1 vote
1 answer
303 views

Why Apache can run a command and root cannot?

I have a server-side script executed by Apache running as www-data. The script runs fine on the server when called remotely (http://example.com/script.sh). I am trying to run the same script on the ...
WoJ's user avatar
  • 3,657
1 vote
2 answers
3k views

Allow www-data to use another user - sudo or ssh

I would like to allow my PHP script (hosted with apache2) to execute commands with another user account. I don't want another website hosted on the server to be able to connect to that another user ...
Pierre Emmanuel Lallemant's user avatar
2 votes
0 answers
74 views

How do I make su wait before retries in freebsd?

I want to make attempts at using the su command timeout for 1 second between tries. Alas, the Google and StackExchange, and rtfm have not yielded results.
fizban's user avatar
  • 21
0 votes
1 answer
902 views

Restricting su command in a specific manner

I have a list of system users who have access to almost everything via sudo. Now I would like to restrict their sudo access for command su. I would like to restrict su command for every user on ...
Meraj Rasool's user avatar
2 votes
2 answers
1k views

Linux: Allow user to execute specific command on behalf of any other user

I am trying to find a way to allow user john to execute a command (say echo) on behalf of another user peter without being prompted for password. I found a thread that I thought would be the answer ...
user336416's user avatar
-2 votes
1 answer
825 views

Is it possible to "sudo su" using ssh in bash? [duplicate]

#!/bin/bash USERNAME=ksmith HOSTS="linux1" YUPDATE="sudo yum -y update" FIXDATE="sudo -u echo -e 'ZONE="America/New_York"\nUTC=true' > /etc/sysconfig/clock" for HOSTNAME in ${HOSTS} ; do ssh -tt -...
Sandfrog's user avatar
0 votes
2 answers
234 views

Restrict su command

I have user1 and user2. Normally, the user root can switch on all users with su command. I want to restrict su command so that the user root can switch only to user1. It is possible??
jjaros's user avatar
  • 259
1 vote
0 answers
1k views

Automatically change remote user with sshfs

I have two remote servers, foo and bar. On both servers I have a user git (with different uid and gid). Both servers are running Debian distributions. Both servers have their each others' root ssh ...
Marandil's user avatar
  • 111
0 votes
1 answer
2k views

SSH tunnel to MySQL running on FreeBSD (Heidi SQL)

I'm trying to use a SSH tunnel to access a MySQL-server running on a FreeBSD 10.1 server. These attempts are done with Heidi SQL (http://www.heidisql.com/). The SSH daemon on the FreeBSD server does ...
Aknot's user avatar
  • 185
-2 votes
1 answer
21k views

can't switch to root or use sudo [closed]

I've just come into the following problem: For some reason I can't use su or sudo: usr@usr-MS-7816:~$ su Password: su: Authentication failure usr@usr-MS-7816:~$ sudo su [sudo] password for usr: ...
user2394156's user avatar
5 votes
3 answers
4k views

SSH: su root or sudo? [duplicate]

What is the better option: Using su to switch to root or enabeling sudo? Without the use of sudo an intruder would need to know the password (or key) of a user allowed to ssh and then also the root ...
Øle Bjarnstroem's user avatar
12 votes
1 answer
76k views

su: /bin/bash: Resource temporarily unavailable

Unable to switch user to postgres. Ulimit settings for postgres user is set with reasonable limits. We are not hitting max. No errors in /var/log/messages. Error: BETA -bash-4.2# sudo su - ...
Chucks's user avatar
  • 531
1 vote
2 answers
8k views

Linux-SSSD: always getting incorrect password when su'ing to domain users, but why?

I've built a new Linux environment at my work place. I've configured sssd and bound it to one of the Active Directory domains of the company. I can tell that the sssd is partially working, let me ...
Itai Ganot's user avatar
  • 10.8k
10 votes
4 answers
17k views

Kernel Tuning with Privileged Docker Container

I'm building a container to tune kernel settings for a load balancer. I'd prefer to deploy those changes to the host in an image using a single privileged container. For example: docker run --rm --...
allingeek's user avatar
  • 262
2 votes
1 answer
2k views

Limit su attempts

Is there a way to limit the number of su attempts from a user? For example, malicious user gets into a user login that has su access. Repeatedly runs su to try to gain superuser access. This ...
Devon's user avatar
  • 800
1 vote
1 answer
3k views

switch to a different user

I'm trying to SSH into a server then switch to a user named "jenkins". As you can see from the commands below, after I run su - jenkins I am still in the root user's home dir, and whoami indicates ...
Dónal's user avatar
  • 281
1 vote
2 answers
4k views

Linux: How to allow a regular user to "su - anotherUser"?

I wrote a Nagios check script which checks if user peeradmin is able to touch a file in some mount on the server. Nagios user is: nagios . I've edited /etc/sudoers and added these lines but none ...
Itai Ganot's user avatar
  • 10.8k
0 votes
1 answer
466 views

Give su permission to LDAP group

I created an LDAP environment and i'm trying to set up a group in the LDAP server that has SU priviledges in all other linux machine that use this ldap server. dn: cn=superfriends,ou=group,dc=example,...
Sudh33ra's user avatar
  • 179
1 vote
1 answer
3k views

su: Authentication failure

I have Ubuntu 14.04 server on which I can't use anything that relies on su. This manifests in inability to restart services or even switch users. root@ci-web1:~# su - mxx su: Authentication failure ...
Mxx's user avatar
  • 2,382
0 votes
1 answer
1k views

Centos : su: incorrect password after bash update

A few days ago I've updated the bash to patch it agains Shellshock and since then I cannot su - root from my regular 'wheelgroupuser' account on Centos 6.5 with WHM. I'm constantly getting su: ...
Sebastian Sulinski's user avatar