2

Redhat Enterprise Linux 5.10 (No we can't upgrade.)

This is related to my other question. I would like to be able to login as another user, like 'tina', so I can test her sudoer permissions.

  • My default shell is csh. (Don't laugh, we don't need anything fancy.)
  • I tried login tina and that didn't work. I got an error Not a login shell.
  • I can't use our Xwindows client because her server Xwindows is set up to go to her IP and her IP only. (Client is Hummingbird Exceed 14.0 for me.)
  • I didn't see a question just like mine here.
  • telnet to the same IP address so I can login as another user gives me an error Connection refused.

Got any ideas?

3
  • I assume you've used the sudo -l -U <user> command to check that sudo has a command set configured for that user...
    – Thomas N
    May 9, 2016 at 14:51
  • @Thomas_N, I just did and she does have access to the commands needed.
    – Bulrush
    May 9, 2016 at 14:58
  • Then @DarkHeart has your most complete answer for testing...
    – Thomas N
    May 9, 2016 at 14:58

1 Answer 1

5

To see another users sudo permissions you can use: sudo -l -U <user>. Provided you have enough permissions yourself.

Or (to answer the question) you can use the su command (aka switch-user). Running it as su - tina will switch to that user and run the login scripts (drop the - to skip this part). You will be prompted for their password.

Or, you use sudo - sudo -u <user> -i (-i = simulate initial login). You will be prompted for your password. This only works if you have enough permissions

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .