• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
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 789 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 Oct 16, 2020, 7:39 AM

    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
    • K
      kiokoman LAYER 8
      last edited by Oct 16, 2020, 7:52 AM

      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 Oct 16, 2020, 8:47 AM

        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
        • K
          kiokoman LAYER 8
          last edited by Oct 16, 2020, 11:13 AM

          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 Oct 16, 2020, 12:28 PM Reply Quote 1
          • P
            penguin-nut @kiokoman
            last edited by Oct 16, 2020, 12:28 PM

            @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 Oct 16, 2020, 1:33 PM Reply Quote 0
            • P
              penguin-nut @penguin-nut
              last edited by Oct 16, 2020, 1:33 PM

              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.

              K 1 Reply Last reply Oct 16, 2020, 3:01 PM Reply Quote 0
              • C
                chrcoluk
                last edited by chrcoluk Oct 16, 2020, 1:42 PM Oct 16, 2020, 1:41 PM

                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
                • K
                  kiokoman LAYER 8 @penguin-nut
                  last edited by Oct 16, 2020, 3:01 PM

                  @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 Oct 16, 2020, 5:39 PM Reply Quote 0
                  • P
                    penguin-nut @kiokoman
                    last edited by Oct 16, 2020, 5:39 PM

                    @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
                    9 out of 9
                    • First post
                      9/9
                      Last post
                    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                      This community forum collects and processes your personal information.
                      consent.not_received