LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Unable to give permission through sudoers to a script accessing /dev/tty13 (https://www.linuxquestions.org/questions/linux-newbie-8/unable-to-give-permission-through-sudoers-to-a-script-accessing-dev-tty13-4175609614/)

Aquarius_Girl 07-11-2017 12:51 AM

Unable to give permission through sudoers to a script accessing /dev/tty13
 
Here abc is the username and ak.sh is the file which I wish to get all the permissions.
Have added the following line on the top of sudoers.tmp which I opened like sudo visudo:

Code:

abc ALL=NOPASSWD: /home/abc/ak.sh
ak.sh contains:

Code:

#!/bin/bash
sudo cat /dev/tty13

When I run the script file, it asks me for password.

cse_200509 07-11-2017 03:05 AM

Unable to give permission through sudoers to a script accessing /dev/tty13
 
this sometimes may be because of sequence of the line you are defining rules in sudoers list. better you check manual for this or google it.


All times are GMT -5. The time now is 02:03 PM.