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

Advertisement

tdecoursey
Joined:
Posts:
8

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

Is it possible to su to root or another user during a initial login session to a server.

Reply with quote

Advertisement

tdecoursey
Joined:
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

Reply with quote

tdecoursey
Joined:
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.

Reply with quote

tdecoursey
Joined:
Posts:
8

Clarity

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.

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Clarity

The procedure for switching users is the same, no matter if you switch to root or other user.

Reply with quote

tdecoursey
Joined:
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"?

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
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

Reply with quote

Zack3000
Joined:
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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
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

Reply with quote

tdecoursey
Joined:
Posts:
8

Two logins, one server

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.

Reply with quote

tdecoursey
Joined:
Posts:
8

Attached file with more details.

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.

Reply with quote

tdecoursey
Joined:
Posts:
8

solution requires screenshots

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.

Reply with quote

tfecw
Guest

Re: Two logins, one server

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

Reply with quote

martin
Site Admin
martin avatar
Joined:
Posts:
27,226
Location:
Prague, Czechia

Re: Two logins, one server

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.

Reply with quote

Advertisement

You can post new topics in this forum