Re: www user than root

From: Bruce M Simpson (bms_at_spc.org)
Date: 06/22/05

  • Next message: Marco Molteni: "Re: www user than root"
    Date: Wed, 22 Jun 2005 16:14:06 +0100
    To: Mrad James Deane <xtremejames183@msn.com>
    
    

    On Wed, Jun 22, 2005 at 05:01:17PM +0200, Mrad James Deane wrote:
    > hello i want to know how the www user with uid:80 can print on a priviliged
    > port like 80 rather the root user im very in trouble i did not find a
    > solution yet mac_portacl is one but it is very experimental please help.
    > thanks

    I think you may have meant 'bind' rather than 'print' here?

    Anyway, the way they used to do this back in the day on Linux at least was
    to hack the socket code to allow binds to privileged ports by certain
    users/groups rather than relying solely on the super-user check.

    You could do something like this in FreeBSD 5-STABLE by hacking the
    in_pcbbind_setup() function in src/sys/netinet/in_pcb.c to not just
    call suser_cred(), but to instead perform a group check, by calling
    groupmember(some_privileged_socket_group, cred).

    Regards,
    BMS
    _______________________________________________
    freebsd-net@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-net
    To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"


  • Next message: Marco Molteni: "Re: www user than root"

    Relevant Pages

    • Non root sshd logging to file issues
      ... I have successfully ran sshd as a non root user on port 5678 and ... to a simple flat file owned by the non root user. ... Surely there must be a simple way for a nonroot user running sshd to log ...
      (SSH)
    • ftp-proxy (again)
      ... Trying to get ftp-proxy to do its magic, ... -> $gateway_private_ip_address port 8021 ... and now `pfctl -vs nat` does show packets matching the rdr line. ... so long as the root user is the owner. ...
      (comp.unix.bsd.freebsd.misc)
    • RE: www user than root
      ... > on a priviliged port like 80 rather the root user im very ... Most daemons that bind to "priveleged" ports and run as a non-root uid, ... then change the effective UID after binding to the port. ... functionality required as wrapper programs ...
      (freebsd-net)
    • www user than root
      ... port like 80 rather the root user im very in trouble i did not find a ... To unsubscribe, ...
      (freebsd-net)
    • Re: Who to run sshd as
      ... I am not sure if you can run sshd as a non root user, or if you can, I think there will be problems like updating wtmp, etc. ... If you want to bind to port 22 as a non root user try to put a rule in the nat table like the following. ...
      (SSH)