Bug 750907 - Using sshd option with Anaconda installer enables ssh access, but root account is locked
Summary: Using sshd option with Anaconda installer enables ssh access, but root accoun...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: lorax
Version: 16
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Will Woods
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-11-02 18:52 UTC by Mark Hamzy
Modified: 2012-01-04 01:40 UTC (History)
4 users (show)

Fixed In Version: lorax-17.1-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-01-04 01:40:56 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mark Hamzy 2011-11-02 18:52:45 UTC
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.90.169
root.90.169'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
root:*:15209:0:99999:7:::
root::14438:0:99999:7:::

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 20:31:26 UTC
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
root::*:15209:0:99999:7:::

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
root::15209:0:99999:7:::

Comment 3 Will Woods 2011-11-09 17:45:56 UTC
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:
http://git.fedorahosted.org/git/?p=lorax.git;a=commitdiff;h=e3bb8700


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