I have created my customized live CD by following the instructions @ Ubuntu Forum Thread 688872

The Live CD gets created fine and it is able to bootup as well. I see my customized setting in place.

I created the Live CD using Ubuntu 10.04 Server edition.

My issue is, when the system boots up with the live CD, it logs in automatically as "ubuntu" user. I want the system to login as "root". Because I will be running quite a few perl automation script off of the live CD and I need to have root privileges.

Now, i know the "sudo" way of doing it, But I am least bothered about the security aspect and want my system to switch to "root" user the moment it boots up.

Is there a hack to achieve the same?

UPDATE: If you cant resist to down vote my question, then please free to do so but do me a favor and let me know why you are down voting by dropping a comment.

  • I strongly advice to find an alternate method for deploying your perl scripts. You do know that you can add post-install scripts to your live cd? (kickstart I think it is called). – Rinzwind Oct 11 '12 at 11:38
  • No, these are not post install scripts, I will running the SPECcpu test in fully automated way. these test and their iteration take 2-3 days to complete. This is a very big chunk of automation and could not be a part of "post kickstart stuff. Thanks for your time. – slayedbylucifer Oct 11 '12 at 13:51
  • also, what's up with the down vote, what is wrong with the question, I really feeling that stackexchange should make comments mandatory while down voting someone's questions... – slayedbylucifer Oct 11 '12 at 13:52
  • Ach @dheeraj someone will come along and upvote. I see a tendency for increased downvotes when someone asks to do anything about sudo/root. Don't bother with it since we can't stop it ;) – Rinzwind Oct 11 '12 at 18:16
  • Would it be an option to put those scripts in cron? Or to make the user ubuntu a sudo account with no password just for the time to run these scripts? I looked around for about an hour but gave up on setting the custom live cd to use root. It looks to much of a hassle. Setting things up post-install is probably easier. – Rinzwind Oct 11 '12 at 18:19

The live CD will forget everything you did during your session, so I'd recommend booting from a USB key with a persistent session. Root has no password in live session, so in the CLI, if you do sudo su, it'll just go to root, and not ask for a password. You could easily make a bash script to go to root and then run your perl scripts.

By default root will timeout after 15 minutes, but you can change that, see this page.

  • yeah, USB is not an option as i will be mounting my ISO via Light out console of the server programatically. Thanks for your time and the hint regarding how to increase root timeout. – slayedbylucifer Oct 11 '12 at 15:24

Hmm... not sure if this exactly relates, but as I described in How is ubuntu live user graphical session (startx) started up in a LiveCD? - if I start with a Mini remix (which ends with text/console login for the live user ubuntu); and then I configure startup of X (or the desktop environment) through /etc/rc.local - then the desktop environment is seemingly started under the root user. Unfortunately, I do not know how to switch to the root user already at login, so that the text mode console starts up as root as well...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.