The "substitute user" Unix command that changes the current user

learn more… | top users | synonyms

1
vote
3answers
237 views

How to exit the super user from middle of shell script?

I have a shell script in which most of the commands need to be run under sesu user and then I need to run some commands as current user. Can you please help me in this?
2
votes
2answers
951 views

How can I automatically pass the password to 'su'?

I am working on an exploit for a security course. The object is to obtain a root shell in a linux virtual machine. So far, I can write to /etc/passwd and change root's password to an arbitrary string. ...
0
votes
2answers
690 views

Ubuntu cant login as super user Authentication failure,for a previously accessed password

i cant login as super user using su command ,previously it was successful and i am sure that password is correct,previosly there was an issue by changing file permission of www folder and i follow ...
0
votes
2answers
219 views

In Solaris how do you startup a script automatically without user input?

I'm using Oracle Solaris, and i would like to startup a script automatically everytime i turn on my computer and log into the desktop, however the script i want to run requires elevated permission, so ...
2
votes
1answer
226 views

“chmod -R 777 /” for a few seconds - now what?

On Centos 6.5 I accidentally typed chmod -R 777 / Ooops. I CTRL + C'ed out of it very quickly, but not before it'd started working away for a couple of seconds. Consequences? Well, already su ...
1
vote
1answer
920 views

SSH: remote switch user and execute command under this new user

I am able to connect to remote machine using public/private keys (without password) as user wakatana. On remote machine I am able to issue: sudo /usr/bin/rootsh -i -u root then I type root's password ...
0
votes
1answer
33 views

Difference between su vs root SSH login for mounting?

I have a bash script luks that I use in Android for mounting/umounting encrypted devices, that can be called in a terminal emulator with su -c "luks ..." The script works ok for the first part, ...
0
votes
1answer
35 views

Cannot access su in fedora 17

I am using Fedora 17. by mistaken, I have given full permission as root, for all the files in /usr/bin My command was chmod 777 * and also I gave full permission for a file(I can't ...
0
votes
1answer
112 views

Debian user keeps getting killed

I keep getting booted out of one of the user account on my Debian Squeeze server. At first I thought that it had something to do with SSH, but it still happens even if I log into another account and ...
0
votes
1answer
221 views

su - user is not doing anything

I am entering to an Ubuntu Server using root, and I need to run a background process as a more limited user, so I write su -l limitedUser -c 'programName' But nothing happens. Even if programName ...
0
votes
1answer
187 views

sudo makes me “lose” permissions when running a script?

I have a script that I need to run. It is kicking off a java program. When I run it as me, it seems to work fine. If I type "sudo myscript.sh" it does not run fine. In reality, I need to run it as ...
1
vote
0answers
526 views

What is the different between “sudo su” and “sudo bash”?

In Ubuntu 13.10, for the default setting, the following command in Terminal user@host:~/path$ sudo su results in entering an prompt root@host:/home/user/path# And this command ...
1
vote
0answers
92 views

OS X: change root umask for su?

In recent versions of OS X (10.6+), the sudo command by default takes the "union" (bitwise or) of 0022 and the caller's user mask. This can lead to problems if the umask is more restrictive than 0022: ...
0
votes
0answers
22 views

Trying to rsync and use sudo on other end

Scenario: Mac OS X Machine - old computer - user: john.doe Mac OS X Machine - new computer - user: john.doe Goal: Copy /Users/john.doe/Desktop and /Users/john.doe/Documents via rsync Problem: ...
0
votes
0answers
543 views

SU : Permission denied /bin/sh

I added a new user in system: $ useradd new_user When I try to switch from root to new_user, I get this error: $ su new_user permission denied /bin/sh $grep new_user /etc/passwd ...
0
votes
0answers
18 views

ec2 enable su for user ubuntu

I am trying to enable rstudio-server login with ubuntu on ec2, but it fails. I think it uses the same auth mechanism as su. So I did sudo passwd su someotheruser su ubuntu But even though I know ...
0
votes
0answers
82 views

Pip SSL certificates fail with sudo but not in su

When I pip install, I can download the package, but I have a failure in writing to files that are only accessible with privileged access. This is expected behavior. When I sudo pip install, I have an ...
0
votes
0answers
78 views

/etc/inittab combined with su - newuser failed to bringup new process with different UID than root

Using /etc/inittab on RHEL 6.3 x86_64 system, we tried to respawn a binary: aka watchdog from newuser UID login when restarted, not as a root UID process. Made the following changes as inline. ...
0
votes
0answers
23 views

deleted crontab on remote machine, but I don't know how

Here's the scenario: I have ssh access to internal.foo.com through bridge.foo.com. I wanted to make a local copy of the crontab from userx on internal.foo.com. My user has sudo access on ...
0
votes
0answers
229 views

Not able to log in as root in fedora 17

I am not able to log in as root in Fedora 17 Error is su: cannot set groups: Operation not permitted What to do to solve this error The permission has been changed to -rwxrwxrwx I want to ...
0
votes
0answers
56 views

Weird behavior of sudo

I use putty to log in to a remote LINUX machine. (Ubuntu 10) When I log in I have to authenticate myself, that goes on pretty smooth. Whenever I try to use sudo or su though, I experience ...