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

    Shell File Changes not Persistent

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 3 Posters 587 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.
    • W
      WvdW
      last edited by

      Hi,

      When making changes in the shell as root and using vi, the changes remain active for the currently running session only. As soon as you reboot the box the changes are all gone.

      An example:

      • I added a new user through the webUI
      • I logged in via SSH and made a change to the .tcshrc of this new user (I added a line to show the console menu when you log in as this user)
      • Everything was working 100%
      • After a reboot the line I added to the file was no longer there and the file reverted to its original version

      Another example:

      • I added the new user to the wheel group
      • Everything was working 100% as expected
      • After a reboot the user is no longer in the wheel group

      Is this expected behaviour? How can I make these changes survive reboots?

      Werner

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        In pfSense all users are recreated from the config at everyboot so many changes of that type are lost.

        You might try this: https://forum.netgate.com/post/1020967

        Steve

        W 1 Reply Last reply Reply Quote 1
        • W
          WvdW @stephenw10
          last edited by

          @stephenw10 I had a look at the post you linked to and that is exactly what I mean... @jimp suggested editing either .profile or .tschrc and adding the line to it.
          If you do this then the changes only last during the current session. Everything is reset after reboot.
          You mentioned that all users are recreated after every boot... does that mean you won't ever be able to make persistent file changes for a user unless you edit the actual scripts that recreate the users during boot?

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            If you want the changes to be present for everyone, you can edit them into /etc/skel/dot.<blah> where <blah> is profile, shrc, or tcshrc.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

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