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

View logs in shell

Scheduled Pinned Locked Moved General pfSense Questions
7 Posts 4 Posters 862 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
    peterlecki
    last edited by peterlecki Mar 16, 2023, 11:15 PM Mar 16, 2023, 11:12 PM

    SSH'ed into pfSense with an admin user that can configure everything in the GUI but

    [2.6.0-RELEASE][admin@pfSense.local]/: cat /var/log/filter.log
    cat: /var/log/filter.log: Permission denied
    
    [2.6.0-RELEASE][admin@pfSense.local]/: ls -l /var/log/filter.log
    -rw-------  1 root  wheel  301615 Mar 16 16:05 /var/log/filter.log
    
    [2.6.0-RELEASE][bisadmin@pfSense.local]/: id
    uid=2000(admin) gid=65534(nobody) groups=65534(nobody),1999(admins)
    

    c30f61bd-409d-4d03-806e-c34189140e0c-image.png

    Apparently admin-level in GUI is not part of the wheel group?

    [2.6.0-RELEASE][admin@pfSense.local]/: sudo
    sudo: Command not found.
    
    G 1 Reply Last reply Mar 17, 2023, 12:07 PM Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Mar 16, 2023, 11:34 PM

      Hmm. Can you access them if you login as root?

      admin should have access to that though unless you have changed the permissions somewhere.

      P 1 Reply Last reply Mar 21, 2023, 4:20 PM Reply Quote 0
      • G
        Gertjan @peterlecki
        last edited by Gertjan Mar 17, 2023, 12:07 PM Mar 17, 2023, 12:07 PM

        @peterlecki said in View logs in shell:

        sudo

        That's a package :

        52fe1c04-838e-4aaf-bd05-8c40c2ea0310-image.png

        But :

        cat /var/log/filter.log
        

        works fine for me, as admin member of the wheel group, so has root rights.

        I can login 'ssh' into pfSense using 'root' or 'admin', I'll be 'root' at the console (checked with whoami).

        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
          peterlecki @stephenw10
          last edited by Mar 21, 2023, 4:20 PM

          @stephenw10
          I'm unable to ssh as root. I reset their password since I don't remember setting it up originally and while I can "su" into root and view logs then, I cannot ssh as root. Is this expected?

          @Gertjan
          Thanks for the tip to install the sudo executable. I can see the logs now if I sudo from the admin user, though I still get denied as just myself. It doesn't seem as though my admin user is in the wheel group as the "id" output shows.

          Anyway, I can see the logs now so thank you guys. My questions above are only because me trying to understand the "why".

          V 1 Reply Last reply Mar 21, 2023, 4:41 PM Reply Quote 0
          • V
            viragomann @peterlecki
            last edited by Mar 21, 2023, 4:41 PM

            @peterlecki
            My admin user hast shell access to the logs with these privileges:
            e3608c4e-f0df-42f4-9ef6-a96b54d85ac2-grafik.png

            1 Reply Last reply Reply Quote 1
            • S
              stephenw10 Netgate Administrator
              last edited by Mar 21, 2023, 5:36 PM

              Yes, admin should have the ssh privilege by default but looking back it looks like yours doesn't for some reason.

              In pfSense admin and root are effectively the same account. There is no root account in the user manager. If you manually changed the root password that could cause other problems.

              Steve

              P 1 Reply Last reply Mar 21, 2023, 6:46 PM Reply Quote 0
              • P
                peterlecki @stephenw10
                last edited by Mar 21, 2023, 6:46 PM

                @stephenw10 @Gertjan
                Doh! User error. I always disable the default "admin" and create another admin user, hence why I was not able to ssh as root. This is probably why my NewAdmin is not in the "wheel" group but instead in the "nobody" group.

                I can't add NewAdmin into wheel group due to

                usermod: command not found
                

                But now that I have "sudo" and I understand the cause for this workaround, I'm fine with it.

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