Topic "su to another user after logging into server as non root."

Author Message
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
Is it possible to su to root or another user during a initial login session to a server.
Advertisements
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
More specifically, i login as my username/password to a server. But with this login, I am unable to copy or edit files. So I need to login again to a another user, eg su -username/password.

Is this configurable in winscp 5.1.8
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Please read documentation:
https://winscp.net/eng/docs/faq_su

If that does not help, come back.
_________________
Martin Prikryl
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
Thank you. I had already read this. I tried but I was not sure I was toggling the correct config. Regardless, what I did toggle did not work. I also tried using tunneling with my Id, and then entering a root id afterwards, still no go. If you have some screenshots on how to do this, that would help.
Again, to recap, I am able to, and have to login with my stnadard user id, but then need to su to root afterwards or configure the tool to do it for me during a full login session.
Thanks.
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
I guess I should have been more clear. The access I am looking for after my initial login is not root. Its a group user with more permissions but not root.
So the question remains, can I log in again, eg su to another user during the initial login session or afterwards.
Thanks.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
The procedure for switching users is the same, no matter if you switch to root or other user.
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
The link does not provide a solution outside of sudo which I can not use.
Is there another solution. Can i add my own command line somewhere that would not use sudo su, rather just "su"?
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
So use su, where sudo is used in the article.

Last edited by martin on 2015-04-10; edited 1 time in total
Zack3000
[View user's profile]

Joined: 2015-04-08
Posts: 1
Location: Germany
Hi,

i've the same Problem.
I need to connect through a Tunnel (HangleServer).
In case Putty: after login, i change the user: "sudo su - tomcat". Thats the only sudo command im allowed to use.
In Case WinSCP: I tried to use this command at the Shell-Tab in the Connection-Settings. not working.
Is there something i forgot? Is it even possible?

Hope you can help me or us.

Regards and thanks for your help
Zack
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
Zack3000 wrote:
i've the same Problem.
I need to connect through a Tunnel (HangleServer).
In case Putty: after login, i change the user: "sudo su - tomcat". Thats the only sudo command im allowed to use.
In Case WinSCP: I tried to use this command at the Shell-Tab in the Connection-Settings. not working.
Is there something i forgot? Is it even possible?

Sorry, your post does not include enough information.

Please read how to troubleshoot problems with WinSCP. If it turns out that you are not able to help yourself, read how to ask for support or report bugs efficiently, so others can help you.
_________________
Martin Prikryl
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
I have hundreds of servers I access daily. Each one requires me to login as my name/password
tdecoursey/passwd.
However, after that session begins, I cant do anything but copy files into my user directory. So I need to login again as admin.
su - admin
passwd

My question is and has always been, does winscp allow you to do do an initial log in and then a subsequent login. keep in mind, this is not sudo, its su to another profile and connecting as that profile.
Thanks.
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
I have attached a file with screenshots. You will have to unzip it.
I am hoping for screenshots back as a solution.
If you cant provide a solution with screenshots, just simply post. "no solution available"
Thanks.
winscp example.zip (111.44 KB) [Download]

Description: (none)

martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
There's nothing more to add to the topic than what is already documented:
https://winscp.net/eng/docs/faq_su
tdecoursey
[View user's profile]

Joined: 2015-03-31
Posts: 8
You provided a solution a while back but you didnt provide screenshots of the use case. So if your just blowing this issue off, then just say so.
We have provided documentation, screenshots, etc and you have provided nothing but a doc someone else wrote that is as generic as a can of peas.
tfecw

Guest


prikryl wrote:
There's nothing more to add to the topic than what is already documented:
https://winscp.net/eng/docs/faq_su


I've been trying to figure this out off and on for a while. Naturally I'm searching the web. I can't tell you how frustrating it is to see this question asked at least 5+ times and to see your answer of 'RTFM' Clearly, the documentation is not sufficient otherwise the same question wouldn't keep coming up.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 25034
Location: Prague, Czechia
You have to understand that this is server-side problem and not client-side. So the documentation we provide here cannot be too specific as the solution differs with the server.
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