User account changes from command line do not persist thru reboot
-
Hi,
Trying to modify a user account thru command line using "pw" command. Everything works fine but If I reboot pfsense box, the changes are lost. (version pfsense 2.4.4 release p3). I want the changes to persist thru reboot. Can't do what I want to do thru WebGUI. User information must be written somewhere else. Ideas?Any help would be appreciated.
-
configurations are automatically generated by the webGUI, any modification you do will be lost after a reboot or after an upgrade.
why are you unable to change the password via webGUI ? -
Not password, user shell and group affiliation. I have an automated script that logs in runs some commands returns results. I need to change shell and group affiliation.
I can use the "pw" shell commands:
"pw groupmod <group> -m <user1>"
"pw usermod <user1> -s <shell to set>These don't persist thru reboot
-
you need to modify /cf/conf/config.xml if you want the change to be persistent after a reboot
-
@kiokoman Are there any references for tags in config.xml? I can see what is in there already but other options, ex. user shell. I have not found a man page that would describe tags available.
Thanks for your help!
-
Is the anyway in config.xml to specify a different shell for user? Without getting into detail I want to set it to what "admin" uses, "/etc/rc.initial".
Any help would be appreciated.
-
I have a patch that ammend's the login menu you see on login, the one with all the numbered options, I added a option 17 for a bash shell.
I can share the patch if you interested in that solution.
0) Logout (SSH only) 9) pfTop 1) Assign Interfaces 10) Filter Logs 2) Set interface(s) IP address 11) Restart webConfigurator 3) Reset webConfigurator password 12) PHP shell + pfSense tools 4) Reset to factory defaults 13) Update from console 5) Reboot system 14) Disable Secure Shell (sshd) 6) Halt system 15) Restore recent configuration 7) Ping host 16) Restart PHP-FPM 8) Shell 17) Bash Shell
-
@penguin-nut
if you add a user to the admin group it will be configured with /bin/tcsh
you just need to put inside /home/$user/.tcshrc/etc/rc.initial
-
@kiokoman I tried that editing directly. It worked, but did not survive a reboot. But this did work:
at the very end of "/etc/skel/dot.tcshrc" I added:
...
if (id -u
!= 0 ) then
/etc/rc.initial
endifthanks for your help, done!