Project

General

Profile

Actions

Bug #31239

open

Can set root password with less than 8 characters on host rebuild

Added by Richard Stempfl over 3 years ago. Updated over 3 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Host creation
Target version:
-
Difficulty:
easy
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

This is always reproducible as soon as a host is built.

1. Create a host, install it and wait until it reported the first time
2. Select host and open "Edit"-page
3. Go to Operating System
4. Edit root password (pen symbol at the right end) to something silly like "123"
5. Click on Submit
6. Rebuild the host
7. Login with the new password

Result: Bad password is accepted and used for root

Expected results:
On clicking submit (step 5), an error should be produced.


Related issues 1 (0 open1 closed)

Related to Foreman - Feature #9993: Root password and partition table should be optional when not in build modeClosedChristine Fouant04/01/2015Actions
Actions #1

Updated by Lukas Zapletal over 3 years ago

  • Status changed from New to Need more information

Operating System does not have root password field. Root password can be only set in host, hostgroup or Administer - Setting. I don't understand.

Actions #2

Updated by Lukas Zapletal over 3 years ago

  • Category set to Host creation
  • Triaged changed from No to Yes

Oh you mean Operating System tab! Weird, probably some UI error? We do have validators for root_pass length, but I think there is probably an issue with ordering - we convert it to crypt/sha first and only THEN we validate the length.

Actions #3

Updated by Richard Stempfl over 3 years ago

Lukas Zapletal wrote:

Oh you mean Operating System tab! Weird, probably some UI error? We do have validators for root_pass length, but I think there is probably an issue with ordering - we convert it to crypt/sha first and only THEN we validate the length.

Right the OS tab while creating a host.

Actions #4

Updated by Lukas Zapletal over 3 years ago

  • Related to Feature #9993: Root password and partition table should be optional when not in build mode added
Actions #5

Updated by Lukas Zapletal over 3 years ago

  • Status changed from Need more information to New
  • Priority changed from Normal to Low
  • Difficulty set to easy

This is actually a "feature" which was implemented for some planned changes in Katello. When not in build mode, root password is not validated for hosts (hostgroups are okay). Granted it could be done in more sensible way, for example only allow blank root password, but a host must be allowed to be created even without root password.

Reach out to #9993 for more details or more discussion on how this could be improved or changed.

Actions

Also available in: Atom PDF