Questions tagged [su]

Substitute User command

Run a command with substitute user and group id, allow one user to temporarily become another user. It runs a command (often an interactive shell) with the real and effective user id, group id, and supplemental groups of a given user.

man page

126 questions
3
votes
0 answers

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 that are not nested, nor in Ubuntu containers…
Daniel Hernández
  • 263
  • 1
  • 2
  • 4
3
votes
4 answers

Configure sudo to ask for root password

Is it possibile to configure sudo to ask for root password instead of user password? The server is configured with a root user and a simple user (let's call him simple) with limited privileges, used to deploy all the applications hosted on the…
Simone Carletti
  • 1,524
  • 3
  • 15
  • 30
2
votes
0 answers

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
  • 21
  • 2
2
votes
2 answers

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 to my question: john ALL = (ALL) NOPASSWD:…
user336416
  • 21
  • 2
2
votes
1 answer

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 example would be a rare occurrence but it still seems…
Devon
  • 800
  • 1
  • 9
  • 20
2
votes
5 answers

Why the same user has different PATH value on linux server?

I logged on to my Linux server (Redhat AS4) through SSH as the user 'guest', then run the command echo $PATH, and the output is /usr/local/bin:/bin:/usr/bin. However, when I run the command su - guest to switch to the same user, then run the…
bluesea007
  • 43
  • 1
  • 4
2
votes
1 answer

"Session terminated, terminating shell...killed"

I have several boxen running Debian Wheezy. They appear to have the highly annoying problem that pressing ctrl+c in a shell that has been su:d to root will kill su, not whatever is running in the root shell. This makes working with e.g. ping or…
Bittrance
  • 3,070
  • 3
  • 24
  • 27
2
votes
1 answer

How should I use sudo from an upstart script?

I am using upstart to run my node.js app on an Amazon Linux AMI EC2 instance. I have had a few issues getting it to work, summarized below. In my script I had a line like this: exec sudo -u www /usr/local/bin/node /var/www/foo/app.js >>…
blu
  • 229
  • 3
  • 8
2
votes
4 answers

Running a command as root from my local machine

I'm currently trying to figure out backing up using rsync - and I've run into a little hitch. I've disabled root access via SSH for security reasons, and have to use my special user account (without sudo permissions) whenever I SSH in to do admin…
user82250
2
votes
2 answers

The difference between su and bash

When I access the network server, I use the command sudo su to get admin privileges. Recently I found that sudo bash is the correct command and will allow me privileges those su does not. What is the difference between sudo su and sudo bash? I…
shantanuo
  • 3,579
  • 8
  • 49
  • 66
1
vote
2 answers

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, nothing new installed; everything was working…
ᴍᴇʜᴏᴠ
  • 577
  • 1
  • 6
  • 20
1
vote
1 answer

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]: + ??? root:jeanbon myserver su[14993]:…
dargaud
  • 193
  • 1
  • 7
1
vote
0 answers

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 script Have the script do a number of things to…
sfxworks
  • 157
  • 1
  • 8
1
vote
1 answer

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 Linux audit and I need enable PAM account locking…
devLP
  • 11
  • 3
1
vote
0 answers

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 error "su: cannot set groups: Operation not…
Kidburla
  • 131
  • 3
  • 8
1 2 3
8 9