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
0
votes
1 answer

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, but when i try to get, I got anoter PIDs. I tried…
0
votes
1 answer

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 system and allow every system user to be able to su to…
Meraj Rasool
  • 180
  • 1
  • 1
  • 7
0
votes
2 answers

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
  • 259
  • 1
  • 4
  • 10
0
votes
1 answer

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 not permit root login. We must first use an…
Aknot
  • 163
  • 1
  • 9
0
votes
1 answer

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,dc=com objectClass: posixGroup cn:…
Sudh33ra
  • 179
  • 1
  • 2
  • 7
0
votes
1 answer

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: incorrect password - even though I know for sure that…
0
votes
1 answer

Difference between su root and su -

What is the difference between switch users in linux with: su root and su -
Justin
  • 5,328
  • 19
  • 64
  • 84
0
votes
1 answer

Why can a local root turn into any LDAP user?

I know this has been asked here before, but I am not satisfied with the answers and don't know if it's ok to revive and hijack an older question. We have workstations that authenticate users on an LDAP server. However, the local root user can su…
0
votes
1 answer

sudo su in screen -- security issue?

Just logged back into a server and reconnected to an existing screen using screen -R. I had completely forgotten that I'd used sudo su - earlier and had not exited afterwards, so when I reconnected via screen I was back in as root! Is there any way…
Jordan Reiter
  • 1,290
  • 4
  • 20
  • 40
0
votes
2 answers

running a remote shell script that switches to a user does not return to the issuing local server shell

When I run a script such as this: ssh -t root@10.10.10.10 '/tmp/somescript.sh' where the script is defined as: #!/bin/sh mkdir -p /data/workday/cred chown -R myuser:myuser /data su myuser - # <------- NOTICE THIS ! ! ! ! rpm -Uvp --force --nodeps…
gextra
  • 205
  • 2
  • 6
0
votes
1 answer

sh bash script ambiguous redirect pid of file using single quotes

I have the following new line in my .sh file su --session-command='$javaCommandLine & >>$serviceLogFile 2>&1 & echo \$! >$pidFile' $serviceUser || return 1 When I had it with double quotes it somewhat worked but the pidFile had the wrong pid it was…
SSpoke
  • 161
  • 2
  • 10
0
votes
1 answer

Proper way to switch users in sudoers

What is the difference between these 2 options in /etc/sudoers: user1 mymachine = (user2) ALL user1 mymachine = /bin/su - user2 For option 1, I would do the following as user1: sudo -u user2 -i For option 2, I would do the following as user1 (this…
0
votes
1 answer

Can't su to login on other user

I have a Debian server, and I can SSH to it.. On SSH there I'm prompted to specify username and pass, I can login here as any user I want.. If I'm root I can change to other users, for example with: "su luxo" to login on user luxo. But if I'm logged…
Kaj
  • 101
  • 3
0
votes
1 answer

How can I have a deamon invoke scripts as another user?

I am configuring a server connected to an UPS. The UPS is managed via apcupsd and it calls some scripts when there is a power outage and when the situation goes back to normal. The server is running serveral virtual machines that are launched by the…
mariosangiorgio
  • 127
  • 2
  • 7
0
votes
1 answer

sudoers nopasswd switch user and run node not working

I'm trying to prevent a password prompt on a command that runs node as the www user by adding the following line to the bottom of my /etc/sudoers file: gituser ALL=(ALL) NOPASSWD: /usr/bin/sudo -u web-user NODE_ENV=production /path/to/node app.js I…
techjacker
  • 133
  • 6
1 2 3
8 9