Bug #5844: FreeNAS default blank password
New installer need to prompt for root password during installation
In order to fix the "blank password" problem in the parent task, we also need to set the root password during installation.
#2 Updated by Sean Fagan about 6 years ago
- Status changed from Unscreened to Fix In Progress
Okay, to do this I'll change netcli to look at argv1, similar to some other things.
After that, then change the installer to run "netcli reset_root_pw" in the new boot environment.
@ -1075,6 +1075,11 @ def main_menu():
menu_max = menu_max + 1
menu_map[menu_max] = item
#3 Updated by Josh Paetzel about 6 years ago
There are some python paradigms for this sort of thing.
Our python programmers tend to get twitchy when we see python that looks like it was written by a (c|shell|perl) programmer. ;). If you extend netcli to look at argv and then do os.system("netcli blah") from another python script you could cause brain bleeds.
I might suggest looking at how notifier.py handles being used from the command line and imported and used from other python modules. (I can't believe I just recommended looking at notifier.py...)
#4 Updated by Sean Fagan about 6 years ago
The install script is sh, not python.
Annoyingly, python won't import a python file unless it ends in ".py". So netcli, which has what I want and therefore I would prefer not to duplicate it, is a mutant half-breed.
So I will simply add something like
chroot /tmp/data /etc/netcli reset_root_pw
I asked about it in irc. Nobody seemed too upset by it.