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

Install Bash pfSense

Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
7 Posts 5 Posters 7.7k 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.
  • A
    andresense
    last edited by Apr 13, 2016, 12:33 PM

    Is there any problem in installing BASH in pfSense?

    1 Reply Last reply Reply Quote 0
    • J
      jimp Rebel Alliance Developer Netgate
      last edited by Apr 13, 2016, 1:45 PM

      We don't generally recommend doing so (Bash has had some security issues over time), but it's not an awful thing to do in general so long as you're aware of it being there and that it might need updating occasionally. On 2.3 it is in our pkg repository, so doing "pkg install bash" will work.

      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 0
      • G
        guardian Rebel Alliance
        last edited by Jul 15, 2016, 4:36 AM

        @jimp:

        We don't generally recommend doing so (Bash has had some security issues over time), but it's not an awful thing to do in general so long as you're aware of it being there and that it might need updating occasionally. On 2.3 it is in our pkg repository, so doing "pkg install bash" will work.

        I installed bash as directed, but I got a message about needing to mount something.

        Can someone tell me what this is about or more importantly what are the implications to the system of doing this.

        As you can see Bash does start and appears to run, but I suspect that there may be errors if I try to do anything serious with it.

        Can I safely follow the directions, or should I uninstall it?

        # pkg search bash
        bash-4.3.42_1                  The GNU Project's Bourne Again SHell
        # pkg install bash
        Updating pfSense-core repository catalogue...
        pfSense-core repository is up-to-date.
        Updating pfSense repository catalogue...
        pfSense repository is up-to-date.
        All repositories are up-to-date.
        The following 1 package(s) will be affected (of 0 checked):
        
        New packages to be INSTALLED:
                bash: 4.3.42_1 [pfSense]
        
        The process will require 5 MiB more space.
        1 MiB to be downloaded.
        
        Proceed with this action? [y/N]: y
        Fetching bash-4.3.42_1.txz: 100%    1 MiB   1.1MB/s    00:01
        Checking integrity... done (0 conflicting)
        [1/1] Installing bash-4.3.42_1...
        [1/1] Extracting bash-4.3.42_1: 100%
        Message from bash-4.3.42_1:
        ======================================================================
        
        bash requires fdescfs(5) mounted on /dev/fd
        
        If you have not done it yet, please do the following:
        
                mount -t fdescfs fdesc /dev/fd
        
        To make it permanent, you need the following lines in /etc/fstab:
        
                fdesc   /dev/fd         fdescfs         rw      0       0
        
        ======================================================================
        # bash
        [root@pfsense ~]# id
        uid=0(root) gid=0(wheel) groups=0(wheel),2(kmem),3(sys),4(tty),5(operator),20(staff),31(guest),1999(admins)
        [root@pfsense ~]# exit
        #
        # ls /dev/fd
        0       1       2
        # cat /etc/fstab
        
        

        If you find my post useful, please give it a thumbs up!
        pfSense 2.7.2-RELEASE

        1 Reply Last reply Reply Quote 0
        • G
          Gertjan
          last edited by Jul 15, 2016, 1:34 PM

          @guardian:

          Can I safely follow the directions, or should I uninstall it?
          …..

          its a FreeBSD && bash thing, so check this out https://forums.freebsd.org/threads/50214/  ;)

          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
          • K
            kpa
            last edited by Jul 15, 2016, 2:19 PM Jul 15, 2016, 1:50 PM

            Don't use bash if you can help it. For simple scripts that you're writing yourself it's perfectly fine to stick to just /bin/sh and the capabilities it offers, the general wisdom is that if you need advanced features of a shell you're better off with perl or python. If you're installing software that absolutely requires bash then it's a different story.

            1 Reply Last reply Reply Quote 0
            • G
              guardian Rebel Alliance
              last edited by Jul 15, 2016, 8:04 PM Jul 15, 2016, 7:22 PM

              @kpa:

              Don't use bash if you can help it. For simple scripts that you're writing yourself it's perfectly fine to stick to just /bin/sh and the capabilities it offers, the general wisdom is that if you need advanced features of a shell you're better off with perl or python. If you're installing software that absolutely requires bash then it's a different story.

              I think I'll take your advice… i looked at the thread mentioned above, but given the importance of security on this box, I'm not prepared to go that far given my very limited knowledge of FreeBSD.

              I ran pkg remove bash

              
              # echo y | pkg remove bash
              
              Checking integrity... done (0 conflicting)
              Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):
              
              Installed packages to be REMOVED:
              	bash-4.3.42_1
              
              The operation will free 5 MiB.
              
              Proceed with deinstalling packages? [y/N]: [1/1] Deinstalling bash-4.3.42_1...
              [1/1] Deleting files for bash-4.3.42_1: .......... done
              
              

              Is there anything else I need to do to clean up the system?
              Should I do pkg clean? Could this screw something up?

              Thanks

              If you find my post useful, please give it a thumbs up!
              pfSense 2.7.2-RELEASE

              1 Reply Last reply Reply Quote 0
              • K
                kpa
                last edited by Jul 16, 2016, 1:05 AM

                You can run 'pkg autoremove' to remove all dependencies that were automatically installed and are no longer needed. That will be enough.

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received