Add migration for legacy nologin shell values
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.
#6 Updated by Dru Lavigne over 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