*BSD News Article 52470


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!simtel!news.sprintlink.net!in2.uu.net!news.erinet.com!inquo!inquo.net!pete
From: Pete Kruckenberg <pete@inquo.net>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: GNU version of su?
Date: Mon, 2 Oct 1995 15:44:53 -0600
Organization: inQuo Internet (801) 530-7160
Lines: 27
Distribution: world
Message-ID: <Pine.BSD/.3.91.951002154023.7250E-100000@inquo.net>
References: <199510022118.OAA06443@tufted.puffin.com>
NNTP-Posting-Host: inquo.net
Mime-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
In-Reply-To: <199510022118.OAA06443@tufted.puffin.com>

On Mon, 2 Oct 1995, Chris Jewell wrote:

> In article <44i0tb$sd7@xymox.dsw.com> you write:

[Stuff about using echo "command" | su news]

> However, are you sure you really want to do that?  You'd have to
> change your services file and all the newsreaders to expect nntp to
> happen on some port >= 1024, since only root can bind to ports below
> 1024, and nntp usually happens on port 119.
> 
> Read the man page for innd, and look at the comments about iindstart.
> It starts up as root, binds to port 119, changes its uid and gid to
> the new id, then exec's innd.  That seems to be what you want.

This has changed with inn1.4unoff2 (on ftp.psu.math.edu in /pub/INN). 
You are actually *supposed* to start rc.news as user news. inndstart is 
suid root, so it actually works fine. I guess it opens fewer security 
holes or something. 

Anyways, it was recommended, and I didn't know how to automate it, so
thanks to everyone who pointed out that I could use echo piped to su to
solve the problem. It works fine. 

Pete Kruckenberg
pete@inquo.net