Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    User account changes from command line do not persist thru reboot

    Scheduled Pinned Locked Moved General pfSense Questions
    9 Posts 3 Posters 694 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • P
      penguin-nut
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • kiokomanK
        kiokoman LAYER 8
        last edited by

        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 ?

        ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
        Please do not use chat/PM to ask for help
        we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
        Don't forget to Upvote with the 👍 button for any post you find to be helpful.

        1 Reply Last reply Reply Quote 0
        • P
          penguin-nut
          last edited by

          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

          1 Reply Last reply Reply Quote 0
          • kiokomanK
            kiokoman LAYER 8
            last edited by

            you need to modify /cf/conf/config.xml if you want the change to be persistent after a reboot

            ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
            Please do not use chat/PM to ask for help
            we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
            Don't forget to Upvote with the 👍 button for any post you find to be helpful.

            P 1 Reply Last reply Reply Quote 1
            • P
              penguin-nut @kiokoman
              last edited by

              @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!

              P 1 Reply Last reply Reply Quote 0
              • P
                penguin-nut @penguin-nut
                last edited by

                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.

                kiokomanK 1 Reply Last reply Reply Quote 0
                • C
                  chrcoluk
                  last edited by chrcoluk

                  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
                  

                  pfSense CE 2.7.2

                  1 Reply Last reply Reply Quote 0
                  • kiokomanK
                    kiokoman LAYER 8 @penguin-nut
                    last edited by

                    @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
                    

                    ̿' ̿'\̵͇̿̿\з=(◕_◕)=ε/̵͇̿̿/'̿'̿ ̿
                    Please do not use chat/PM to ask for help
                    we must focus on silencing this @guest character. we must make up lies and alter the copyrights !
                    Don't forget to Upvote with the 👍 button for any post you find to be helpful.

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      penguin-nut @kiokoman
                      last edited by

                      @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
                      endif

                      thanks for your help, done!

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post
                      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.