Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-12-2014, 09:04 AM   #1
Registered: Oct 2008
Posts: 190

Rep: Reputation: 16
Autologin as root but require password

In order to run a simple Windows restore script, I need a basic shell-only Debian install to autologin as root. I normally do this via mingetty, but I only know how to make that give a root prompt. This obviously presents the problem of someone initiating the restore without permission, or ctrl+c-ing the restore script before it's started and obtaining root access to the whole system, including user data.

What I'd like, instead, is for the shell to initiate the root login, but request a password. Just as if the user had entered "root" at the login prompt, but without them actually having to do this.

How do I do this?

Last edited by Changes; 08-12-2014 at 09:12 AM.
Old 08-12-2014, 09:23 AM   #2
LQ Guru
Registered: Mar 2004
Distribution: Slackware
Posts: 5,388

Rep: Reputation: 408Reputation: 408Reputation: 408Reputation: 408Reputation: 408
If someone is able to boot to your restore script that means he has physicall acess, no? If yes, don't you think he could be also able to boot at init level 1 which gives root access without password?
Old 08-12-2014, 09:28 AM   #3
LQ Guru
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,144

Rep: Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886Reputation: 886
i dont see how sudo wouldnt work here.

what i would do is sudo dd if=/dev/windows.iso of=/dev/sda1
Old 08-12-2014, 10:51 AM   #4
Registered: Oct 2008
Posts: 190

Original Poster
Rep: Reputation: 16
Originally Posted by schneidz View Post
i dont see how sudo wouldnt work here.

what i would do is sudo dd if=/dev/windows.iso of=/dev/sda1
I'll do this next time, but the setup I'm working now is already set up to do everything as root, so I'd like to do it my way this last time.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] OpenSSH: require both, Password and RSA-Key for root-login didi86 Linux - Security 8 05-14-2014 05:24 AM
acpi script to change LED requires root and I need to make it not require root. Sidicas Linux - Laptop and Netbook 1 01-31-2013 11:07 PM
How to execute shell commands that require root password from PHP ? newbie_0404 Linux - Software 2 06-27-2010 08:16 AM
HowTo "su aUser" as root and not require a password racoco Solaris / OpenSolaris 4 04-17-2010 02:24 PM
Why does kppp.desktop require root userid for non-root user? Linux - Networking 4 08-27-2001 09:18 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:43 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration