Bug 750907 - Using sshd option with Anaconda installer enables ssh access, but root account is locked
Using sshd option with Anaconda installer enables ssh access, but root accoun...
Product: Fedora
Classification: Fedora
Component: lorax (Show other bugs)
All Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2011-11-02 14:52 EDT by Mark Hamzy
Modified: 2012-01-03 20:40 EST (History)
4 users (show)

See Also:
Fixed In Version: lorax-17.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-01-03 20:40:56 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mark Hamzy 2011-11-02 14:52:45 EDT
Description of problem:
When the Anaconda installed is booted and the 'sshd' boot option is passed, you still cannot sshd into the system with an empty password.

[root@chukar ~]# ssh root@
root@'s password:
Permission denied, please try again.

When I switch to a bash console, I notice that there are two root entries in the shadow file.

[anaconda root@(none) /]# grep root /etc/shadow

The first entry causes the account to be locked.

Lorax has the following command in the share/runtime-postinstall.tmpl file:

append etc/shadow "root::14438:0:99999:7:::"
Comment 2 Mark Hamzy 2011-11-04 16:31:26 EDT
The root password is still not empty.  There is only one root entry now and it looks like this:

[anaconda root@(none) /]# grep root /etc/shadow

The fix looked like it added a colon and kept the *.  It should be:

[anaconda root@(none) /]# sed -i -e 's,::[*]:,::,' /etc/shadow
[anaconda root@(none) /]# grep root /etc/shadow
Comment 3 Will Woods 2011-11-09 12:45:56 EST
hah, yep, I forgot that 'replace' uses regexes, so:
  replace "root:*:" "root::" etc/shadow
would end up replacing "root:" with "root::". Should be:
  replace "root:\*:" "root::" etc/shadow

Fixed in git:

Note You need to log in before you can comment on or make changes to this bug.