PDA

View Full Version : [lubuntu] sudo command on startup



The Khra
December 17th, 2011, 06:02 PM
Hi,
I want to automount a truecrypt partition at lubuntu startup (using keyfiles) without a prompt for sudo password. I tried to put the truecrypt mount command in /etc/rc.local but it doesen't worked. I also added the command to /etc/xdglxsession/Lubuntu/autostart but no way. How can I do that?
Thanks in advance
The Khra

boast
December 17th, 2011, 08:29 PM
rc.local runs things as root

9072997
December 17th, 2011, 08:35 PM
i think, though i am not positive that you have to soft link things in rc.local to /etc/rc5.d/S99procesName to get them to start in runlevel 5 (the default runlevel)

The Khra
December 17th, 2011, 09:51 PM
rc.local runs things as root
As said this does not work for me

i think, though i am not positive that you have to soft link things in rc.local to /etc/rc5.d/S99procesName to get them to start in runlevel 5 (the default runlevel)
What should I put in /etc/rc5.d? A bash file including the command?

dentaku65
December 18th, 2011, 03:42 AM
You can do it in this (UNSAFE) way.


nano $HOME/pass
and write your password in this file.

Then, load the command:

sudo your_command < $HOME/pass

But, rc.local must works in this way:

sudo chmod +x /etc/rc.local
And the file must end always with this string:

exit 0


Enjoy