Can't get sudo su - userid to work

Advertisement

OrionRed
Joined:
Posts:
1
Location:
Ohio

Can't get sudo su - userid to work

I have run around and around with the different options in the FAQs and forum posts. None of them fit my situation closely enough for me to adapt.

If I use PuTTY, I log in with a ppk RSA key file. Then I use "sudo su - userid" to change to the higher privileged user. When I do that command, I do NOT have to enter a password.

So, for the SFTP setting, there is a sample that reads like
"su -c /bin/sftp-server" so that's missing the userid and the sudo

There is a popular link on StackOverflow that shows:
"sudo su -c /usr/lib/sftp-server" which is still missing the userid

I though it might be a formatting problem, so I created a script with just
/usr/lib/sftp-server
in it and it worked to connect as my normal user. if i added the sudo line like this:
sudo su - userid
/usr/lib/sftp-server
then it just hangs

So my question is: Can I do the equivalent of "sudo su - userid" and then launch sftp-server?

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum