-3

Some Linux users like my company build Linux servers to use on factory production lines. We write software to load BIOS and FLASH memory and test our products. We constantly need to reboot these production Linux servers and continue testing WITHOUT NEEDING AN OPERATOR to sit there and enter a root PASSWORD on every reboot. There are users out there that don't want or need mandatory root/user password security. It just adds COST to the production processes. How in RHEL 7.x (or more specifically Scientific Linux 7.x) can we simply boot a system into runlevel1 (emergency/rescue mode) without a root password? I've done days of research and have not found a method to disable the root password. Is it possible? (BTW: this was not a problem in 6.x)

0
  1. Remove the original getty@tty1.service symlink:

    rm /etc/systemd/system/getty.target.wants/getty@tty1.service
    
  2. Make a copy of the getty@.service file and call it getty@tty1.service

    cp /lib/systemd/system/getty@.service /etc/systemd/system/getty@tty1.service
    
  3. Edit this file (the last line, must be ADDED):

    [Service]
    ...
    ExecStart=-/sbin/agetty --autologin root --noclear %I
    ...
    [Install]
    ...
    ;Alias=getty@tty1.service
    
  4. Make a symlink in getty.target.wants

    ln -s /etc/systemd/system/getty@tty1.service /etc/systemd/system/getty.target.wants/getty@tty1.service
    
  5. Reboot. It everything went fine you will be logged in as root.

Whole forum found: Here

  • Edit the service how? Otherwise this would be a "link-only" Answer. Thanks! – Jeff Schaller Feb 20 at 2:36

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.