Suid executables
-
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.
-
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.
-
See section 4.3.3 here: http://www.freebsd.org/doc/en/books/handbook/permissions.html
-
I would check that, thank you!