Results 1 to 5 of 5

Thread: sudo command on startup

  1. #1
    Join Date
    Dec 2011
    Beans
    2

    Question sudo command on startup

    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

  2. #2
    Join Date
    Jul 2006
    Beans
    325

    Re: sudo command on startup

    rc.local runs things as root

  3. #3
    Join Date
    Jul 2010
    Beans
    24

    Re: sudo command on startup

    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)
    Even if I did have a super cool and unique signature, you don't think I would be dumb enough to put it here where you could steel it do you.

  4. #4
    Join Date
    Dec 2011
    Beans
    2

    Re: sudo command on startup

    Quote Originally Posted by boast View Post
    rc.local runs things as root
    As said this does not work for me
    Quote Originally Posted by 9072997
    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?

  5. #5
    Join Date
    Oct 2005
    Location
    Milano, Italy
    Beans
    871
    Distro
    Ubuntu Jaunty Jackalope (testing)

    Re: sudo command on startup

    You can do it in this (UNSAFE) way.

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

    Then, load the command:
    Code:
    sudo your_command < $HOME/pass
    But, rc.local must works in this way:
    Code:
    sudo chmod +x /etc/rc.local
    And the file must end always with this string:
    exit 0

    Enjoy
    Last edited by dentaku65; December 18th, 2011 at 03:49 AM.
    ------------------------------------------------
    yep ”short and long URL„
    http://yep.it/
    ------------------------------------------------

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •