The UNIX and Linux Forums  
Hello and Welcome from to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com




Thread: sudo su error
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-18-2008
karayan karayan is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 4
sudo su error

Hello,

I am logging to a server using username 'test'. I want to execute some commands as user test2.

When I am trying to run `sudo su - test2 -c 'ls'` it gives error user 'test' is not allowed to run sudo in host. But when I login into the account 'test2' using sudo su - test2 all these commands work.

Is there any way I can get this working? I need to do that because I want to run this command from a script. I think it is related to permissions for user test. Please advise.

Regards,
Saura