SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
After a few hours work I have managed to set up pptd so that my daughter can log into her account at Imperial College.
My problem now is that I need to have a script that she can run if she wants to log in. She will have to invoke a couple of root commands and I do not want to give her the root password
then user 'daughter' will be permitted to execute "sudo /usr/sbin/pppd call imperial dump debug logfd 2 nodetach require-mppe" and "sudo /sbin/ip route add default dev ppp0" without supplying a password (if the parameters are changed at all, then the command won't run).
You will probably wish to incorporate those commands in a script, but that script can be run by your daughter and the calls to those two commands will get executed without password prompting.
Use 'man sudoers' for information on additional options.
Do I really have to use visudo to edit this rather than kdesu kate?
No, you do not have to use 'visudo'; however, there are a couple of advantages.
As explained in "man 8 visudo":
Quote:
visudo locks the sudoers file against multiple simultaneous edits, provides basic sanity checks, and checks for parse errors. If the sudoers file is currently being edited you will receive a message to try again later.
I think I have solved that with chmod +s /usr/sbin/pppd
No you didn't and you shouldn't. If the application isn't meant to be run setuid root then basically you've created a weakness. Sudo is there to avoid making mistakes like that. But what's more worrying is the idea that making anything setuid root "solves" things: I suggest you reread the most basic GNU/Linux docs again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.