Re: Who to run sshd as

On Fri, Oct 27, 2006 at 11:44:04PM -0400, James Stickland wrote:
I setuid the sshd binary to execute as a normal user "joe"

Don't do that!

but that user does not have permission to bind the socket.

How can i have my sshd run as non-root, yet still bind the socket?

Run it on a different port (greater than 1023). Then run it *as* the
other user, but *not* setuid!

su joe -c /usr/sbin/sshd # or whatever

But I don't think it'll be very useful -- it won't be able to "log you
in" as anyone but the user as whom it's running, since it won't have
the privileges to switch users.

Oh, and you may need to turn off privilege separation, since it won't
be able to switch users to the sshd account either.