inphektion
February 13th, 2009, 07:43 PM
I'm trying to create an account on my server that no other account can su or sudo into (except one specified in visudo). However I want to allow ssh login to this account.
so I created a user with adduser --disable-password test
then I edit visudo to say
mainuser ALL=(ALL) /bin/su test
hoping that mainuser is now the only user who can su to test.
However this isn't working, still get authentication failure.
The idea is that with the test account when people login to it the .bash_login points to a script that runs a program. This works well as a general user account my problem is that others with local user accounts on the system can 'su test' and get around the .bash_login and have access to it. So everyone needs to ssh to the server as test but not su.
any pointers?
so I created a user with adduser --disable-password test
then I edit visudo to say
mainuser ALL=(ALL) /bin/su test
hoping that mainuser is now the only user who can su to test.
However this isn't working, still get authentication failure.
The idea is that with the test account when people login to it the .bash_login points to a script that runs a program. This works well as a general user account my problem is that others with local user accounts on the system can 'su test' and get around the .bash_login and have access to it. So everyone needs to ssh to the server as test but not su.
any pointers?