igotnoluck
Jan 10 2008, 09:32 PM
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
dude67
Jan 11 2008, 06:47 AM
QUOTE (igotnoluck @ Jan 10 2008, 11:32 PM)

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...
http://mandrivausers.org/index.php?showtopic=43340
scarecrow
Jan 11 2008, 07:03 AM
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
igotnoluck
Jan 12 2008, 08:16 AM
QUOTE (dude67 @ Jan 11 2008, 08:47 AM)

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

)
i want to start at start up a console window and then in it run a script automatically.
thanks,
noluck
dude67
Jan 12 2008, 08:43 AM
OK - I didn't get that part - sorry.