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
4
votes
3 answers

Can't su to user other than root on CentOS

I'm able to SSH to my server (CentOS 5.9) using an admin account with sudo privileges: $ ssh admin@myserver Last login: Wed Feb 27 19:23:11 2013 from [IP ADDRESS] [admin@myserver ~]$ Then I can su to root: [admin@myserver ~]$ sudo su root [sudo]…
ChiCgi
  • 163
  • 1
  • 1
  • 4
4
votes
7 answers

run script as another user from a root script with no tty stdin

Using CentOs, I want to run a script as user 'training' as a system service. I use daemontools to monitor the process, which needs a launcher script that is run as root and has no tty standard in. Below I give my five different attempts which all…
Viktor Trón
  • 141
  • 1
  • 1
  • 5
4
votes
2 answers

how to deny "sudo su"

I have several servers where some users require to be sudoers to work. The problem is that when sudoers can run the command sudo su and login as user root. It seems very risky to run that command. I tried with Command Alias ​​in the file…
Gon
  • 91
  • 1
  • 2
  • 8
4
votes
2 answers

How to su to another user in mac OS X?

I came from Linux world , and not familiar with OS X admin. Now I want to su to another user , but it just not working ... Where goes wrong here ? smallufo@miniserver:~ $ whoami smallufo smallufo@miniserver:~ $ su -…
smallufo
  • 199
  • 2
  • 8
4
votes
1 answer

/bin/su permission denied after SELinux is enabled - not resolved by manual creation of SELinux policies

For some reason, I can't su to root with from a non-root user: [rilindo@kerberos ~]$ /bin/su - -bash: /bin/su: Permission denied Running output from /var/log/audit/audit.log either returns this: [root@kerberos tmp]# cat /tmp/audit type=AVC…
Rilindo
  • 5,078
  • 5
  • 28
  • 46
4
votes
2 answers

Having users su/sudo in Linux based on Active Directory group when using pam_winbind

I'm using openSUSE 11.4 which has Active Directory configuration built-in to Yast (which does all the pam_winbind, Kerberos, nss, Samba-client stuff for you) and I can successfully authenticate against my AD domain. I created an AD group called…
djsumdog
  • 1,100
  • 2
  • 16
  • 29
4
votes
2 answers

"su _www helloworld.php" does nothing

In the context of a larger effort, I've run across a particular issue that is baffling me. On Mac OS X 10.6.7, using the system provided Apache and PHP, I have created a simple HelloWorld.php script that, no surprise, just prints Hello, World! and…
bbum
  • 141
  • 5
3
votes
2 answers

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 root by using command sudo su ,the console gets…
niraj
  • 31
  • 1
  • 2
  • 5
3
votes
3 answers

What is the difference between "su --command" and "su --session-command"?

Running # su - oliver --command bash gives a shell but also prints the warning bash: no job control in this shell, and indeed Ctrl+Z and fg/bg don't work in that shell. Running # su - oliver --session-command bash gives a shell without printing the…
oliver
  • 405
  • 1
  • 7
  • 18
3
votes
3 answers

Why is local root able to su to any LDAP user?

We have an LDAP server set up with our Active Directory. When users login to a Linux machine with LDAP client installed as root, they are able to su - into any Active Directory account without needing that users password. This is a big security…
Steven
  • 63
  • 1
  • 6
3
votes
4 answers

How to grant su access without password to one user only in wheel group (FreeBSD)?

I know how to enable su without a password for all wheel group users by adding the appropriate configuration line in /etc/pam.d/su. I do not want to enable this for all wheel users but only one particular user. I am using FreeBSD 8.1. How do I do…
David G
  • 338
  • 3
  • 8
3
votes
1 answer

centos: su silently fails

On a CentOS server where I'm logged via SSH as root, I do: su otherusername where 'otherusername' is the user name of another user, which exists. It does nothing. After that, I'm still root. whoami returns root, any file I create belongs to root,…
matteo
  • 731
  • 2
  • 9
  • 21
3
votes
3 answers

What's the magic of the "sudo su"?

[demo@PHP_DEV_57 ~]$ sudo su [root@PHP_DEV_57 www]# Why I can switch to root by simply sudo su, what's the difference between sudo and su?
yoyo
  • 57
  • 1
  • 4
3
votes
2 answers

Strange message after su

After performing the regular update of my Ubuntu 10.04.1, and a reboot (because kernel update), I opened a terminal window and entered $ su - Password: su: Authentication failure $ $ su - Password: Added user root. # (First I…
Déjà vu
  • 5,546
  • 9
  • 36
  • 55
3
votes
0 answers

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 su: failed to execute /bin/bash: Permission…
Nicolas De Jay
  • 209
  • 2
  • 11
1 2
3
8 9