su after a connection

Advertisement

cruiser
Joined:
Posts:
1

su after a connection

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 ):?:

thx
mike

Reply with quote E-mail

Advertisement

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: su after a connection

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.

Reply with quote

Guest

Re: su after a connection

martin 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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
41,518
Location:
Prague, Czechia

Re: su after a connection

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 :-) 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.

Reply with quote

dasr
Guest

Re: su after a connection

martin 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 :-) 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).

Reply with quote

Advertisement

martin
Site Admin
martin avatar

Re: su after a connection

Thanks for hint. I haven't known about the 'sudo' and 'super'. I'll think about utilizing them.

Reply with quote

Advertisement

You can post new topics in this forum