Bug #23615
Disallow attribute changes for builtin users
SilverStone DS380 | AsRock C2750D4I | Intel 2.4gHz 8C Avoton C2750
32GB Crucial CT5008061 U-ECC 1.35v | StarTech PEXESAT322I
SSD | Samsung 850 EVO 120GB
2.5" | { HGST: HTS721010A (3) } Z1
3.5" | { WD: WD60EFRX (2) | Seagate: ST5000DM00 (2) ; ST4000DM00 (3) } Z2 ; { ST4000VN000 (8) } Z2
FreeNAS 11 Nightlies | { PNY Turbo USB3 32GB (2) } Mirror
Description
NOTE: I wasn't sure what Category this should go in and figured home directory relates best to Shell¶
I changed the root home directory to the users directory I use for all all other users (/mnt/nas-system/users
), as I store scripts and system files I've modified that need to be copied over after an update in the root home folder (/root
), which is not ideal due to /root
being wiped after an update.
- I realized after changing the root home directory, all jails created now have the new directory (
/mnt/nas-system/users/root
) specified as their root home directory, which creates a major problem since~
is now broken in all [non-plugin] jails created (not sure about plugin jails, as I don't use them).- If this is not expected behavior, should I create an additional bug report?
[root@crashplan-1] /# cd ~
/mnt/nas-system/users/root: No such file or directory.
The WebGUI requires the home directory to be on a dataset other than boot, also creating a problem is the boot dataset is not shown, ergo, once changed via the WebGUI, it's no longer possible to revert back to /root
on the boot dataset for root's home directory.
- While reverting root's home directory back to
/root
will save successfully in the WebGUI, it will remain unchanged after the save.- Changing via
chsh root
doesn't work either.
- Changing via
- I also noticed when I went to edit root, and accidentally clicked on daemon instead, after selecting save I received the error "Home directory has to start with /mnt/ or be /nonexistent"
I'm not sure if this is expected behavior or a bug, and if it is expected behavior, what is the recommended procedure to revert root's home directory back to the boot dataset via cli?
Associated revisions
History
#1
Updated by Kris Moore almost 4 years ago
- Category changed from 485 to 2
- Assignee changed from Kris Moore to William Grzybowski
- Priority changed from No priority to Nice to have
- Target version set to 11.1
#2
Updated by William Grzybowski almost 4 years ago
- Status changed from Unscreened to Screened
#3
Updated by Zoom Zoom almost 4 years ago
- Subject changed from Once modified, unable to revert root home directory via WebGUI to Once modified, unable to revert root home directory via WebGUI or CLI
#4
Updated by William Grzybowski almost 4 years ago
- Status changed from Screened to Unscreened
- Assignee changed from William Grzybowski to Kris Moore
Load-balancing
#5
Updated by Kris Moore almost 4 years ago
- Assignee changed from Kris Moore to Suraj Ravichandran
#6
Updated by Suraj Ravichandran almost 4 years ago
- Status changed from Unscreened to Screened
#7
Updated by Dru Lavigne over 3 years ago
- Assignee changed from Suraj Ravichandran to William Grzybowski
William: please load balance between Vladimir and Nikola.
#8
Updated by William Grzybowski over 3 years ago
- Status changed from Screened to Unscreened
- Assignee changed from William Grzybowski to Nikola Gigic
- Priority changed from Nice to have to Critical
- Seen in changed from Master - FreeNAS Nightlies to 11.0
Nikola, lets not allow builtin users to change home directory.
#9
Updated by Zoom Zoom over 3 years ago
Although it's not that likely someone else will do what I did, in case anyone does, is there a way to correct this, or is it recommended to simply save the config and reinstall?
#11
Updated by William Grzybowski over 3 years ago
Zoom Zoom wrote:
Although it's not that likely someone else will do what I did, in case anyone does, is there a way to correct this, or is it recommended to simply save the config and reinstall?
Workaround is to manually edit the config database:
sqlite3 /data/freenas-v1.db "update account_bsdusers set bsdusr_home = '/root' where bsdusr_uid = 0"
#12
Updated by William Grzybowski over 3 years ago
- Status changed from Unscreened to Screened
- Assignee changed from Nikola Gigic to William Grzybowski
I will handle this ticket.
#13
Updated by William Grzybowski over 3 years ago
- Status changed from Screened to Ready For Release
#14
Updated by Dru Lavigne over 3 years ago
- Subject changed from Once modified, unable to revert root home directory via WebGUI or CLI to Disallow attribute changes for builtin users
#15
Updated by Dru Lavigne over 3 years ago
- Target version changed from 11.1 to 11.1-BETA1
#16
Updated by Dru Lavigne over 3 years ago
- Status changed from Ready For Release to Resolved
#17
Updated by Joe Maloney over 3 years ago
- Needs QA changed from Yes to No
- QA Status Test Passes FreeNAS added
- QA Status deleted (
Not Tested)