Substitute User command
-1
votes
2answers
46 views
su command works without prompting password
I'm on a RHEL server where the su command drops the user into root without prompting for a password. Obviously, this is a pretty big cause for concern which I'd like to fix. I'm not in contact with ...
-9
votes
1answer
43 views
When I am root, how do I run one command as user “pi”? [closed]
When I am root, how do I run one command as user "pi"?
Distribution Wheezy.
2
votes
3answers
67 views
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 ...
0
votes
1answer
19 views
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 ...
0
votes
1answer
41 views
su between regular user accounts fails with “su: incorrect password”
user1 wants to su to user2 (both are non-root). When user1 runs su - user2, he's prompted for user2's password as expected, but the password is never accepted.
user1@host $ su - user2 (switch ...
0
votes
1answer
34 views
Running su with -c gives unrecognized command error
I am trying to run a command as another user in Linux. Here is what I run:
su user1 -c '/bin/mkdir /tmp/zz'
However, this gives me this error:
fatal: unrecognized command '/bin/mkdir /tmp/zz'
0
votes
1answer
78 views
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 ...
1
vote
2answers
179 views
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 ...
0
votes
2answers
50 views
Logout root after tmux detach
I'm running tmux on my servers and when configuring things I like to just su into root and take care of things. Is there a possibilty to log out root automatically after I detach the tmux session?
-1
votes
2answers
140 views
“su” does not work on FreeBSD
Below I sun "su" command on FreeBSD:
FreeBSD rand.vstyle.local 9.0-RELEASE FreeBSD 9.0-RELEASE #0 amd64
This is server RAND :)
[svn@rand ~]$ su logostudiotest1 /bin/ls
Password:
/bin/ls: /bin/ls: ...
4
votes
1answer
128 views
What's the difference between “sudo su -” and “sudo -i”? [duplicate]
Possible Duplicate:
What is the difference between sudo -i and sudo su -
I know both commands result in gaining a root-shell. But there are some differences.
On some servers e.g. the prompt ...
3
votes
4answers
335 views
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 ...
1
vote
1answer
120 views
Root SSH login works, but su/sudo to root does not work
Im recently working on a clients box, and SSH into the box with root credentials work but when i try to su or sudo to root user it states incorrect password. I tried changed the root password and know ...
0
votes
2answers
68 views
Can not su to normal user [closed]
I have a centos 5.8 box with gitolite installed .
It worked fine until I yesterday my gitolite didn't work. ( fatal the remote end hung up unexpectedly)
I logged to the box using root account. and ...
4
votes
3answers
215 views
Can I sudo a command on behalf of another user?
I'm using drupal and Aegir. Aegir automates many tasks of site creation. Aegir has control of Apache, I'm logen in as root, and I want to restart the Apache server, but I want to do it on Aegirs ...
1
vote
1answer
57 views
Unable to su into any user
After I have fiddled with the folders /usr/bin, /usr/lib and /usr/lib64 I restored them, but was not able to su into root (and probably other accounts too):
Permissions on the password database may ...
1
vote
1answer
226 views
Restrict su to domain user in Winbind/Kerberos Linux AD integration
We've got some RHEL 5 servers joined to AD using Winbind/Kerberos which is working well overall.
I've specified an AD security group in PAM to restrict which domain users can login.
auth ...
1
vote
1answer
75 views
running commands as other users - best method
When running commands as other users from the command line, what is recommended best practice? In the past I've used sudo like so:
sudo -u username command [args]
I've been told (with no ...
0
votes
0answers
135 views
Can't login as root but I can SU while logged with another user
What I was doing before this happened?:
I was tinkering trying to setup X server so I can open an app's GUI remotely so I installed "X Window System", "xclock" and uncommented "# ForwardX11 yes" ...
1
vote
2answers
101 views
using screen in another user with su
So, if i do this:
su -c 'screen -dmS screenname script to run' - user to run as
It won't work. The screen command is working if excecuted from root, so there is no problem there.
If I do:
su - ...
1
vote
1answer
76 views
sudo rejects password that is correct
sudo (Which I have configured to ask for a password) is rejecting my password (as if I mis-typed it) I am absolutely not typing it incorrectly. I have changed the password temporarily to alphabetic ...
0
votes
1answer
139 views
running a command as root with /bin/su and without gives different results
Some background: I have a machine with SLES 11 installed. I am running a bash script that one of its lines is /bin/su $USER -c SOME_CMD.
Unfortunately, the SOME_CMD that comes after the -c keeps ...
0
votes
3answers
53 views
Regular user doing su
I'm using Ubuntu server 12.04.
If a user is only a member of it's own group why he can still do su SOME_OTHER_USER ? Can I prevent this?
1
vote
2answers
262 views
How can I create an “su” only user (no SSH or SFTP) and limit who can “su” into that account in RHEL5? [duplicate]
Possible Duplicate:
How can I allow one user to su to another without allowing root access?
We have a user account that our DBAs use (oracle). I do not want to set a password on this ...
2
votes
2answers
1k views
“Cannot set terminal process group” during su, after upgrading to Debian Testing
I've got a bog standard Debian 6.0 install here that I decided to sidegrade to the Debian Testing repositories. I did this by swapping out the references to the Squeeze repos in my sources.list to use ...
1
vote
1answer
43 views
Changed Password Won't seem to work for account
Bit of an odd problem. I've got a server I can SSH into as one of two logins: root or erik. Once I've logged in as erik I've tried to switch to the root user:
# sudo su - root
Password:
And entered ...
0
votes
1answer
204 views
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 ...
2
votes
2answers
1k views
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.
...
2
votes
2answers
701 views
BASH Scripting, su to www-data for single command
I am working on automating the creation of subversion repositories and associated websites as described in this blog post I wrote. I am running into issues right around the part where I su to the ...
4
votes
2answers
505 views
How to grant su access to wheel without asking for password on FreeBSD?
I would like to grant users of the wheel group (other sysadmins) su access without being asked for password.
I know how to do it with pam in linux, but the question now is for FreeBSD. I am not ...
4
votes
3answers
660 views
SU and Run Command Using Expect
I want to su to another user, using expect, and then run a graphical program as that user. I am using kcalc to test with:
#!/usr/bin/expect
set timeout 20
spawn su dummy
expect "Password:"
send ...
1
vote
1answer
1k views
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 ...
0
votes
2answers
494 views
Why does “sudo su - X” require password, but “sudo -u X bash” doesn't?
I know "why" questions are dangerous :) I have sudo access on RHEL, and noticed this:
su -u fred su -
Password:
(I don't know fred's password).
sudo -u fred bash
[fred] $
Is there a way to not ...
2
votes
3answers
590 views
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 ...
3
votes
4answers
2k views
run script as user who has nologin shell
All I need to do is to run a specific script as a particual user who does have the nologin/false shell indicated in /etc/passwd.
I would run the script as root and this should run as another user.
...
0
votes
1answer
174 views
su command not responding?
It is bit hard to describe. I will try list them:
BACKGROUND:
SUSE enterprise 10 sp3
I am using SecureCRT to telnet.
There's two user app and oracle.
I am not in the server room, I can't reboot ...
1
vote
2answers
834 views
Executing a command as a nologin user
I've recently set up my server so that my suPHP 'virtual' users can't be logged into by using this article
My issue now is that before when I ran a rake command for my Ruby on Rails application ...
3
votes
2answers
604 views
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
...
2
votes
1answer
952 views
/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:
...
2
votes
4answers
112 views
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 ...
0
votes
3answers
101 views
Using su which user was I?
I use su when I often need to set proper permissions when copying files etc, but forget if I used su to get there, ex:
root@host> su bob
bob@host> copy folderA folderB
But sometimes I forget ...
1
vote
1answer
1k views
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 ...
1
vote
1answer
193 views
.bashrc doesn't get sourced after su'ing to root
I've got a CentOS 5.6 VPS and both root and my normal user account have identical copies of a .bashrc file in their home directories. The file contains a few basic aliases, etc.
If I login to root, ...
5
votes
2answers
1k views
Run command as Linux “system” user (shell = /bin/false)
I created a "system" user in Ubuntu 11.04 (adduser --system) for running certain cron jobs, but sometimes I want to test things out by manually running commands as that user. What's the easiest way to ...
1
vote
2answers
596 views
Running a command a different user using `su` gives “standard in must be a tty”
I am using STAF to automate db2 interface testing with our product. I am able to run the command using su - db2inst1 -c "/home/db2inst1/sqllib/bin/db2 list database directory" but when I try the same ...
1
vote
2answers
427 views
“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 ...
8
votes
2answers
2k views
Why does redirecting 'script' to /dev/null/ allow 'screen' to work while su'ed as another user?
I was su'ed into a user to run a particular long running script. I wanted to use screen but I got the error message "Cannot open your terminal '/dev/pts/4' - please check."
So I Googled around and ...
2
votes
2answers
264 views
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 ...
3
votes
3answers
222 views
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?
1
vote
2answers
194 views
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 -
...