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

LDAP Insecure Shell Access

Scheduled Pinned Locked Moved General pfSense Questions
5 Posts 2 Posters 561 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.
  • S
    skeels78
    last edited by Oct 6, 2023, 11:58 PM

    I've successfully setup LDAP in pfSense - I can login to the GUI with the correct permissions. I'm also seeing the opposite - users that are not part of my defined group CANNOT login to the GUI.

    This issue is with shell authentication using LDAP.
    I have Shell Authentication Group DN configured with

    CN=pfSense_Admin,OU=Groups,DC=ad,DC=example,DC=com
    

    When I login (using SSH) to the shell with my AD user, I get the following output, followed by being dropped into the pfSense CLI menu.

    You must be a memberOf of CN=pfSense_Admin,OU=Groups,DC=ad,DC=example,DC=com to login.
    

    I do appear to have limited privileges - i.e. I can't restart services, run pfTop, or reboot the firewall.
    I can open the shell and issue commands and a non-root user.

    This isn't an issue is any given user doesn't have the correct attributes configured on their user account. But, that also isn't a solution to denying shell access to a firewall.

    Has anyone seen this behavior or been able to replicate this? (I did see a Reddit post about this)

    NOTE: I'm using Active Directory on Windows Server 2022.
    NOTE: I've setup the necessary user attributes in AD to allow a user to login to the pfSense shell. I can already login to the shell - albeit in an insecure/broken way.

    1 Reply Last reply Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Oct 8, 2023, 5:24 AM

      So, to be clear, you expect those users to be able to login at the CLI without a warning and have full permissions from the group?

      1 Reply Last reply Reply Quote 0
      • S
        skeels78
        last edited by Oct 8, 2023, 2:12 PM

        Yes (or whatever permissions are assigned to the group in the GUI). The issue here being that pfSense isn't respecting the group declaration. I can create a new AD user, not put that user in any groups, and still login to the CLI of pfSense.

        1 Reply Last reply Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Oct 8, 2023, 4:25 PM

          So if you test it in Diag > Auth it returns the expected groups and they match the groups defined in pfSense?

          1 Reply Last reply Reply Quote 0
          • S
            skeels78
            last edited by Oct 8, 2023, 10:52 PM

            Yep! I can login to the GUI just fine assuming my user is part of the "pfSense_Admin" group - the same group I have setup in the shell auth group section

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