igotnoluck Posted January 10, 2008 Report Share Posted January 10, 2008 Hi, i wrote a pptp connection script for my friend but we need to run it as root how can i set in the mandriva that everytime that a user will log in the script will run as root ? i tried using the kdesu command but how do i make it open a shell window and run something ? thanks Quote Link to comment Share on other sites More sharing options...
dude67 Posted January 11, 2008 Report Share Posted January 11, 2008 (edited) how can i set in the mandriva that everytime that a user will log in the script will run as root ?i tried using the kdesu command but how do i make it open a shell window and run something ? thanks Did you even try the forum search? With the words "autostart script" I managed to find a list where the below topic was fourth from the top... https://mandrivausers.org/index.php?showtopic=43340 Edited January 11, 2008 by dude67 Quote Link to comment Share on other sites More sharing options...
scarecrow Posted January 11, 2008 Report Share Posted January 11, 2008 (edited) Assuming that you want the script "foo" being run after the user "user1" login, put it at a system path e.g. /bin, add it to the user's ~.bashrc and then (if the script includes commands which need root access) run "visudo" and add a line: %user1 ALL=/bin/foo Notice that this will give root access to that script for all members of the group "user1" Now, save and exit ( :wq using vim ) and the script will run next time the user logs in. If you wish this script being run by many users, not just "user1" and the members of the "user1" group, put it in /etc/rc.local instead Edited January 11, 2008 by scarecrow Quote Link to comment Share on other sites More sharing options...
igotnoluck Posted January 12, 2008 Author Report Share Posted January 12, 2008 Did you even try the forum search? yes i tried to search the forum, and i found what you pointed but i ask something different (maybe i didn't explain myself very well :unsure: ) i want to start at start up a console window and then in it run a script automatically. thanks, noluck :) Quote Link to comment Share on other sites More sharing options...
dude67 Posted January 12, 2008 Report Share Posted January 12, 2008 OK - I didn't get that part - sorry. :D Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.