Topic "su after a connection"

Author Message
cruiser
[View user's profile]

Joined: 2003-06-27
Posts: 1
I'd rather not store su passwords, but I do like to keep profiles for WinSCP.

Is there a way to su after making a connection?
( mainly I need to chown or attrib files )Question

thx
mike
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
You cannot execute 'su' in WinSCP session. At least most of the servers refuse to execute 'su' for session with not allocated PTY. But you may try it from 'Console' window.
_________________
Martin Prikryl
Guest




prikryl wrote:
You cannot execute 'su' in WinSCP session. At least most of the servers refuse to execute 'su' for session with not allocated PTY. But you may try it from 'Console' window.


su requires user input ( the password! ), how do you get around that? Or am I missing something obvious?

mike
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Anonymous wrote:
su requires user input ( the password! ), how do you get around that? Or am I missing something obvious?

IMHO you cannot get around that. 'su' needs PTY for security reasons. So to say: you need to be human to run 'su', and WinSCP is not a human Smile For example you cannot create file with your password and redirect it as input to 'su'. It will detect that. If you find some solution, let me know, I'm interested.
_________________
Martin Prikryl
dasr

Guest


prikryl wrote:
IMHO you cannot get around that. 'su' needs PTY for security reasons. So to say: you need to be human to run 'su', and WinSCP is not a human Smile For example you cannot create file with your password and redirect it as input to 'su'. It will detect that. If you find some solution, let me know, I'm interested.


How about using sudo or super? That wouldn't need access to tty (at least when configured to not ask password).
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Thanks for hint. I haven't known about the 'sudo' and 'super'. I'll think about utilizing them.
_________________
Martin Prikryl
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24530
Location: Prague, Czechia
Please read FAQ to learn how to switch user.
_________________
Martin Prikryl
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