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

    Suid executables

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 1.6k 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.
    • N
      ncolunga
      last edited by

      Hi,

      I've created a shell user but i'm having problems with suid exes like passwd or su. I've created a root owned script that only calls whoami command and i have set the suid bit (chmod 4555) on the file but it doesn't works. I've checked if the nosuid flag was set on the partition but it doesn't.

      /dev/ad8s1a on / (ufs, local, fsid c530804ec03c32c9)
      devfs on /dev (devfs, local, fsid 00ff000808000000)
      /dev/md0 on /var/run (ufs, local, fsid 501b984e6a798130)
      /dev/md10 on /var/tmp/havpRAM (ufs, local, soft-updates, fsid 641b984ee26488db)

      Is the suid function disable on pfsense?

      Thank you.

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

        I believe that suid only works on binaries, not interpreted scripts. I've hit that in the past where I had to run a simple shell script through a sh->c compiler to be able to run it suid.

        An alternative would be to install sudo and set the sudoers files up to allow your user to run that command without a password via sudo.

        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
        • jimpJ
          jimp Rebel Alliance Developer Netgate
          last edited by

          See section 4.3.3 here: http://www.freebsd.org/doc/en/books/handbook/permissions.html

          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
          • N
            ncolunga
            last edited by

            I would check that, thank you!

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