Project

General

Profile

Bug #36168

Add migration for legacy nologin shell values

Added by Brett Keller about 2 years ago. Updated about 2 years ago.

Status:
Done
Priority:
No priority
Assignee:
Waqar Ahmed
Category:
Middleware
Target version:
Seen in:
Severity:
Low
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No

Description

I have a several old FreeNAS installations that have been progressively upgraded from version to version over the years. The original installations date back to at least the 9.3 days, and some may be earlier than that -- I don't remember for certain.

At some point there was a change to the value stored in the database when a user account's shell was set to "nologin" in the GUI. It used to be "/sbin/nologin" and now it is "/usr/sbin/nologin". Non-system user accounts that were created prior to this change still hold the old value of "/sbin/nologin" in their "account_bsdusers" database records even on the latest FreeNAS 11.1U5. Newly created records get "/usr/sbin/nologin" instead.

When one of these legacy records is edited in the GUI, the "/sbin/nologin" value is not interpreted properly, and the GUI shows "netcli.sh" instead. This issue is not just cosmetic, though, because if any change is made in the GUI (even to fields other than "Shell"), the whole record is updated with all of the values currently shown in the GUI, and now the "netcli.sh" value is committed to the config database as "//etc/netcli.sh", overwriting the intended "nologin" config.

In summary, when an admin goes to edit an older user account in the FreeNAS GUI with a legacy value for "Shell", they may cause unintentional changes in the user's selected shell even if they never touch this field. An unrelated change such as adding a new group to a user can cause a change in shell.

Associated revisions

Revision fcbcbb3b (diff)
Added by Waqar Ahmed about 2 years ago

Legacy shell values updated This commit updates all users who had a legacy value for the shell nologin which was causing unintended changes Ticket: #36168

History

#1 Updated by Dru Lavigne about 2 years ago

  • Category changed from OS to Middleware
  • Assignee changed from Release Council to William Grzybowski

#2 Updated by William Grzybowski about 2 years ago

  • Assignee changed from William Grzybowski to Waqar Ahmed
  • Target version changed from Backlog to 11.2-BETA2
  • Severity changed from New to Low

Waqar, we need to add a migration changing the values as described in the ticket.

#3 Updated by Waqar Ahmed about 2 years ago

  • Status changed from Unscreened to Screened

#4 Updated by Waqar Ahmed about 2 years ago

  • Status changed from Screened to In Progress

#5 Updated by Waqar Ahmed about 2 years ago

  • Status changed from In Progress to Ready for Testing

#6 Updated by Dru Lavigne about 2 years ago

  • Subject changed from Legacy values for "Shell" are interpreted incorrectly by GUI user editor and introduce unintentional changes upon user edit to Add migration for legacy nologin shell values
  • Needs Doc changed from Yes to No
  • Needs Merging changed from Yes to No

#7 Updated by Bonnie Follweiler about 2 years ago

  • Status changed from Ready for Testing to Passed Testing
  • Needs QA changed from Yes to No

#9 Updated by Dru Lavigne about 2 years ago

  • Status changed from Passed Testing to Done

Also available in: Atom PDF