Switching user for unix sessions

Advertisement

Donut
Guest

Switching user for unix sessions

This probably sounds a bit wierd, but I have to connect to a unix box and the login user has no access to the files I want so normally i would use "sudo su" to get the access right once i get on. Is it possible to Switch User with WinSCP? 8)

Reply with quote

Advertisement

UmbralEchoes
Joined:
Posts:
3
Location:
Atlanta, GA

I'm using WinSCP (version 4.05) in Windows XP, connecting to a Linux machine. I can't get this to work, and I've done the following as instructed in the FAQ:

* Edited /etc/sudoers as instructed
* Edited Environment -> SCP/Shell to set Shell to /bin/bash -c 'sudo su -' (also tried sudu su root, to no avail)

Am I missing something?

Here's the part of the log file showing where I'm connecting, and the sudo su is being executed:
. 2007-12-19 10:55:45.421 Return code variable: Autodetect; Lookup user groups: Yes
. 2007-12-19 10:55:45.421 Shell: /bin/bash -c 'sudo su root', EOL: 0
. 2007-12-19 10:55:45.421 Clear aliases: Yes, Unset nat.vars: Yes, Resolve symlinks: Yes
. 2007-12-19 10:55:45.421 Alias LS: No, Ign LS warn: Yes, Scp1 Comp: No
. 2007-12-19 10:55:45.421 Local directory: default, Remote directory: home, Update: No, Cache: Yes
. 2007-12-19 10:55:45.421 Cache directory changes: Yes, Permanent: Yes
. 2007-12-19 10:55:45.421 DST mode: 1
. 2007-12-19 10:55:45.421 --------------------------------------------------------------------------
. 2007-12-19 10:55:45.484 Looking up host "xxx.xxx.xxx.xxx"
. 2007-12-19 10:55:45.484 Connecting to xxx.xxx.xxx.xxx port 22
. 2007-12-19 10:55:45.578 Server version: SSH-2.0-OpenSSH_4.3
. 2007-12-19 10:55:45.578 We claim version: SSH-2.0-WinSCP_release_4.0.5
. 2007-12-19 10:55:45.578 Using SSH protocol version 2
. 2007-12-19 10:55:45.625 Doing Diffie-Hellman group exchange
. 2007-12-19 10:55:45.750 Doing Diffie-Hellman key exchange
. 2007-12-19 10:55:46.140 Host key fingerprint is:
. 2007-12-19 10:55:46.140 ssh-rsa 2048 xx:xx:xx:xx:xx:xx:xx...
. 2007-12-19 10:55:46.156 Initialised AES-256 client->server encryption
. 2007-12-19 10:55:46.156 Initialised HMAC-SHA1 client->server MAC algorithm
. 2007-12-19 10:55:46.156 Initialised AES-256 server->client encryption
. 2007-12-19 10:55:46.156 Initialised HMAC-SHA1 server->client MAC algorithm
! 2007-12-19 10:55:46.265 Using username "admin".
. 2007-12-19 10:55:46.312 Session password prompt (admin@xxx.xxx.xxx.xxx's password: )
. 2007-12-19 10:55:46.312 Using stored password.
. 2007-12-19 10:55:46.312 Sent password
. 2007-12-19 10:55:46.359 Access granted
. 2007-12-19 10:55:46.406 Opened channel for session
. 2007-12-19 10:55:46.453 Started a shell/command
. 2007-12-19 10:55:46.453 --------------------------------------------------------------------------
Here is the part of the log file showing where I'm denied access to a directory:
< 2007-12-19 10:55:50.671 Status/error code: 3, Message: 3339, Server: Permission denied, Language:  
* 2007-12-19 10:55:50.718 (ECommand) Error listing directory '/home/svn'.
* 2007-12-19 10:55:50.718 Permission denied.
* 2007-12-19 10:55:50.718 Error code: 3
* 2007-12-19 10:55:50.718 Error message from server: Permission denied
* 2007-12-19 10:55:50.718 Request code: 11

Reply with quote

Advertisement

You can post new topics in this forum