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

    pfsense enable shell history

    Scheduled Pinned Locked Moved General pfSense Questions
    12 Posts 7 Posters 1.3k 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.
    • T
      tayuser
      last edited by

      not working. the shell history still gone after logoff. require reboot or restart service?
      any method to do in the GUI?

      1 Reply Last reply Reply Quote 0
      • P
        Popolou
        last edited by Popolou

        The default shell is tcsh and it used to be configurable in the .tcshrc file but subsequently moved into the GUI. If you go into the User Manager and edit the user, there is a tickbox at the bottom: -

        f3dc3307-e6a4-4511-b46a-41b4588041d4-image.png

        The comment within that file is misleading and legacy. It would probably be helpful if it was cleaned up at a later date.

        T jimpJ JonathanLeeJ 3 Replies Last reply Reply Quote 4
        • stephenw10S
          stephenw10 Netgate Administrator
          last edited by

          Yup there's a gui option for that now.

          You need to log back in after setting that against the user.

          1 Reply Last reply Reply Quote 2
          • T
            tayuser @Popolou
            last edited by

            @Popolou is there a global setting to enable all user login history?

            GertjanG P 2 Replies Last reply Reply Quote 0
            • GertjanG
              Gertjan @tayuser
              last edited by

              @tayuser said in pfsense enable shell history:

              all user login history?

              All ?
              There is just one user, called 'admin'.
              Its a firewall after all, not a file server or something like that.

              No "help me" PM's please. Use the forum, the community will thank you.
              Edit : and where are the logs ??

              1 Reply Last reply Reply Quote 0
              • P
                Popolou @tayuser
                last edited by

                @tayuser said in pfsense enable shell history:

                @Popolou is there a global setting to enable all user login history?

                I think by adding <keephistory></keephistory> to the end of each of the user's block within the xml config file, it will get picked up on reboot. But, i have not done this myself and would give way to the more experienced here! IMHO for the trouble of a few clicks vs the downtime, i'd probably just do this through the GUI.

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

                  There isn't a single check box to enable it for all users though.

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

                    @Popolou said in pfsense enable shell history:

                    The comment within that file is misleading and legacy. It would probably be helpful if it was cleaned up at a later date.

                    Curious what you meant here, there is no comment in .tcshrc that says to touch a file. The current content is:

                    # Enable command history storage and related settings if the user is configured
                    # to do so. See https://redmine.pfsense.org/issues/11029
                    set keephistory=`/usr/local/sbin/read_xml_tag.sh boolean system/user\[uid=\'${uid}\'\]/keephistory`
                    if ( $?prompt && ($keephistory == "true")) then
                    [...]
                    

                    So there is no mention of the old method there, and the linked redmine issue also links to the updated behavior.

                    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!

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      Popolou @jimp
                      last edited by

                      @jimp Yes on reflection i was perhaps vague. I meant i felt there was no longer a need to ref the redmine anymore since it's effectively a legacy issue that you subsequently dealt with and if you agree, could now be removed.

                      1 Reply Last reply Reply Quote 0
                      • JonathanLeeJ
                        JonathanLee @Popolou
                        last edited by

                        @Popolou thanks

                        Make sure to upvote

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