Topic "Switching user for unix sessions"

Author Message
Donut

Guest


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? Cool
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please read FAQ.
_________________
Martin Prikryl
UmbralEchoes
[View user's profile]

Joined: 2007-12-19
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 -'" (without the quotes; 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
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
It looks like you have not selected SCP protocol.
_________________
Martin Prikryl
UmbralEchoes
[View user's profile]

Joined: 2007-12-19
Posts: 3
Location: Atlanta, GA
That seems to have done it -- thanks! I've updated the FAQ page to make the instructions a bit more clear.
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License