🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
22 messages
22 total messages Started by Rebecca Ore Tue, 23 Jan 2001 09:36
If only the wheel group can su to root
#50062
Author: Rebecca Ore
Date: Tue, 23 Jan 2001 09:36
17 lines
1570 bytes
How does the news user in news group start rc.d?  I'm getting an error
message that eval: //news/bin/inndstart: permission denied.

Should I just go ahead and put the user in the wheel group?  I've done
a search on netbsd and inn on both google and deja and didn't see any
obvious answer.  I built from source that wasn't part of the NetBSD
package system.

The file permissions look like this:

-r-sr-x---  1 root  news    87196 Jan 18 04:41 inndstart

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50065
Author: Russ Allbery
Date: Tue, 23 Jan 2001 09:55
18 lines
1487 bytes
Rebecca Ore <rebecca@ogoense.net> writes:

> How does the news user in news group start rc.d?  I'm getting an error
> message that eval: //news/bin/inndstart: permission denied.

inndstart should be owned by root and group news, mode 4711.

> The file permissions look like this:

> -r-sr-x---  1 root  news    87196 Jan 18 04:41 inndstart

...so that looks right.

Which means that the user that's running rc.news is not in the news group.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Re: If only the wheel group can su to root
#50066
Author: Rebecca Ore
Date: Tue, 23 Jan 2001 11:29
31 lines
2077 bytes
Russ Allbery <rra@stanford.edu> writes:

> Rebecca Ore <rebecca@ogoense.net> writes:
> 
> > How does the news user in news group start rc.d?  I'm getting an error
> > message that eval: //news/bin/inndstart: permission denied.
> 
> inndstart should be owned by root and group news, mode 4711.
> 
> > The file permissions look like this:
> 
> > -r-sr-x---  1 root  news    87196 Jan 18 04:41 inndstart
> 
> ...so that looks right.
> 
> Which means that the user that's running rc.news is not in the news group.

Some other person who recreated my news user didn't put that user in
the proper group.  I just spent more time than I'd expected learning
how to change various levels of permissions, recreate and renumber
groups and finally just edit the file by hand and then renumber news
the user.

It started okay, but I'm not able to initialize the server either from
localhost or from the other machine I've given reading privileges to.


-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50068
Author: Rebecca Ore
Date: Tue, 23 Jan 2001 12:06
43 lines
2629 bytes
Rebecca Ore <rebecca@ogoense.net> writes:

> Russ Allbery <rra@stanford.edu> writes:
> 
> > Rebecca Ore <rebecca@ogoense.net> writes:
> > 
> > > How does the news user in news group start rc.d?  I'm getting an error
> > > message that eval: //news/bin/inndstart: permission denied.
> > 
> > inndstart should be owned by root and group news, mode 4711.
> > 
> > > The file permissions look like this:
> > 
> > > -r-sr-x---  1 root  news    87196 Jan 18 04:41 inndstart
> > 
> > ...so that looks right.
> > 
> > Which means that the user that's running rc.news is not in the news group.
> 
> Some other person who recreated my news user didn't put that user in
> the proper group.  I just spent more time than I'd expected learning
> how to change various levels of permissions, recreate and renumber
> groups and finally just edit the file by hand and then renumber news
> the user.
> 
> It started okay, but I'm not able to initialize the server either from
> localhost or from the other machine I've given reading privileges to.

It appears to be a problem in readers.conf.

Jan 23 07:02:26 paradoxa nnrpd[9872]: pyrophore.ogoense.net syntax error in //ne
ws/etc/readers.conf(72), Unexpected token.
Jan 23 07:02:38 paradoxa nnrpd[9873]: pyrophore.ogoense.net syntax error in //ne
ws/etc/readers.conf(72), Unexpected token.
Jan 23 07:03:31 paradoxa nnrpd[10038]: localhost syntax error in //news/etc/read
ers.conf(72), Unexpected token.



-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50067
Author: Frank Slootweg
Date: Tue, 23 Jan 2001 14:10
37 lines
2298 bytes
  Adding to Russ' comments:

  I am not familiar with (Net)BSD startup procedures, but would assume
that "rc.d" is normally run bu root, not news. On my system, HP-UX a
System V Release V look-alike, I have /sbin/init.d/news which does a

nohup su news -c "/usr/local/news/etc/rc.news" &

i.e., like Russ said, rc.news, i.e. also inndstart, runs as news, and
since inndstart is set-UID root, it effectively runs as root, so during
*system* startup, it is:

root (/sbin/init.d/news) -> news ("su news") -> root (set-UID root)

  This setup has the advantage that both root and news can start/stop
INN and INN is set-UID root a short and as little as possible.

[FWIW, I am running INN 1.7.2]

Rebecca Ore <rebecca@ogoense.net> wrote:
> 
> How does the news user in news group start rc.d?  I'm getting an error
> message that eval: //news/bin/inndstart: permission denied.
> 
> Should I just go ahead and put the user in the wheel group?  I've done
> a search on netbsd and inn on both google and deja and didn't see any
> obvious answer.  I built from source that wasn't part of the NetBSD
> package system.
> 
> The file permissions look like this:
> 
> -r-sr-x---  1 root  news    87196 Jan 18 04:41 inndstart
> 
> -- 
> Rebecca Ore
> http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50094
Author: Rebecca Ore
Date: Wed, 24 Jan 2001 03:15
39 lines
2548 bytes
Frank Slootweg <franks@neth.hp.com> writes:

>   Adding to Russ' comments:
> 
>   I am not familiar with (Net)BSD startup procedures, but would assume
> that "rc.d" is normally run bu root, not news. On my system, HP-UX a
> System V Release V look-alike, I have /sbin/init.d/news which does a
> 
> nohup su news -c "/usr/local/news/etc/rc.news" &

I found out that while root was a member of the group news, news
wasn't.  After some jumbling and juggling, I got that fixed (too many
roots spoil the PFY or whatever I am).


> 
> i.e., like Russ said, rc.news, i.e. also inndstart, runs as news, and
> since inndstart is set-UID root, it effectively runs as root, so during
> *system* startup, it is:
> 
> root (/sbin/init.d/news) -> news ("su news") -> root (set-UID root)
> 
>   This setup has the advantage that both root and news can start/stop
> INN and INN is set-UID root a short and as little as possible.

NetBSD has regular users who can't su to root, wheel group members who
have special privileges, and low numbers PID (or whatever, I can't
remember and I'm too tired to look it up) for special groups (0 for
root).  I had to add news to news and (probably) to wheel (users can
be members of multiple groups).

(If this was a problem, I'll fix it after I've had more sleep).

I'm now able to post and read the groups I've asked to be fed.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50097
Author: Jeremy
Date: Wed, 24 Jan 2001 05:51
20 lines
1527 bytes
Rebecca Ore  <rebecca@ogoense.net> wrote:

>> root (/sbin/init.d/news) -> news ("su news") -> root (set-UID root)
>> 
>>   This setup has the advantage that both root and news can start/stop
>> INN and INN is set-UID root a short and as little as possible.
> 
> NetBSD has regular users who can't su to root, wheel group members who
> have special privileges, and low numbers PID (or whatever, I can't
> remember and I'm too tired to look it up) for special groups (0 for
> root).  I had to add news to news and (probably) to wheel (users can
> be members of multiple groups).

The wheel group is enforced on BSD by the su program itself.  A user
doesn't need to be in the wheel group to run a setuid root program,
only to actually su to root.

-- 
Jeremy  |  jeremy@exit109.com
Re: If only the wheel group can su to root
#50105
Author: Jeremy
Date: Wed, 24 Jan 2001 05:53
10 lines
1013 bytes
Rebecca Ore  <rebecca@ogoense.net> wrote:

> Jan 23 07:02:26 paradoxa nnrpd[9872]: pyrophore.ogoense.net syntax error
> in //news/etc/readers.conf(72), Unexpected token.

Presumably, the error is at line 72.

-- 
Jeremy  |  jeremy@exit109.com
Re: If only the wheel group can su to root
#50100
Author: Rebecca Ore
Date: Wed, 24 Jan 2001 07:24
32 lines
2463 bytes
Jeremy <jeremy@exit109.com> writes:

> Rebecca Ore  <rebecca@ogoense.net> wrote:
> 
> >> root (/sbin/init.d/news) -> news ("su news") -> root (set-UID root)
> >> 
> >>   This setup has the advantage that both root and news can start/stop
> >> INN and INN is set-UID root a short and as little as possible.
> > 
> > NetBSD has regular users who can't su to root, wheel group members who
> > have special privileges, and low numbers PID (or whatever, I can't
> > remember and I'm too tired to look it up) for special groups (0 for
> > root).  I had to add news to news and (probably) to wheel (users can
> > be members of multiple groups).
> 
> The wheel group is enforced on BSD by the su program itself.  A user
> doesn't need to be in the wheel group to run a setuid root program,
> only to actually su to root.

Should the news users only be in the news group, then?  I figure I can
take some of the other ones off the same way I cleaned everything up
(sheesh, who'd have thought text tools were as stupid as GUI tools for
doing what I really needed to do).  At the point I got confabbled,
news wasn't a member of the group news.  I now know what I was looking
at.

Sigh.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50101
Author: Rebecca Ore
Date: Wed, 24 Jan 2001 07:30
22 lines
1987 bytes
Jeremy <jeremy@exit109.com> writes:

> Rebecca Ore  <rebecca@ogoense.net> wrote:
> 
> > Jan 23 07:02:26 paradoxa nnrpd[9872]: pyrophore.ogoense.net syntax error
> > in //news/etc/readers.conf(72), Unexpected token.
> 
> Presumably, the error is at line 72.

Fixed now.  I ebombed myself with replies from tests shortly after
that.

I got conflicting advice on how to set up outgoing feeds and will try
to mix and match that to get the working nature of one and the sound
sitedness of the other.  Need also to get the energy curve closer to
the learning curve (and I really shouldn't be awake now), but I'm up,
even if there are some things that need to be tweaked.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50113
Author: Jeremy
Date: Wed, 24 Jan 2001 21:09
20 lines
1606 bytes
Rebecca Ore  <rebecca@ogoense.net> wrote:

>> The wheel group is enforced on BSD by the su program itself.  A user
>> doesn't need to be in the wheel group to run a setuid root program,
>> only to actually su to root.
> 
> Should the news users only be in the news group, then?

Doesn't matter all that much, from an INN perspective; it would be a
matter of local policy or preference.  The wheel group in BSD means
"these users are allowed to su to root".  If your news user will be set
up with no working password and you won't ever be logging in as that
user, just su'ing to it (that's how I do it) then having it in the wheel
group is totally unnecessary.  If you actually log in to the system as
news, then you probably do want it in wheel, so you can su to root when
necessary.

-- 
Jeremy  |  jeremy@exit109.com
Re: If only the wheel group can su to root
#50115
Author: Andrew Gierth
Date: Wed, 24 Jan 2001 21:45
13 lines
1585 bytes
>>>>> "Rebecca" == Rebecca Ore <rebecca@ogoense.net> writes:

 Rebecca> Should the news users only be in the news group, then?

there is not normally any need for the 'news' user to be in any other
groups.

BTW, the 'news' user is not protected against members of the 'news'
group - do not put any other users in the news group.

-- 
Andrew.
Re: If only the wheel group can su to root
#50122
Author: Rebecca Ore
Date: Thu, 25 Jan 2001 05:34
22 lines
1923 bytes
Andrew Gierth <andrew@erlenstar.demon.co.uk> writes:

> >>>>> "Rebecca" == Rebecca Ore <rebecca@ogoense.net> writes:
> 
>  Rebecca> Should the news users only be in the news group, then?
> 
> there is not normally any need for the 'news' user to be in any other
> groups.
> 
> BTW, the 'news' user is not protected against members of the 'news'
> group - do not put any other users in the news group.

I'm the only human with accounts on *that* machine.  The users are on
pyrophore, so they're only reading news through port 119, not on the
local spool.

I take it root is a member of all groups.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50123
Author: Rebecca Ore
Date: Thu, 25 Jan 2001 05:48
29 lines
2447 bytes
Jeremy <jeremy@exit109.com> writes:

> Rebecca Ore  <rebecca@ogoense.net> wrote:
> 
> >> The wheel group is enforced on BSD by the su program itself.  A user
> >> doesn't need to be in the wheel group to run a setuid root program,
> >> only to actually su to root.
> > 
> > Should the news users only be in the news group, then?
> 
> Doesn't matter all that much, from an INN perspective; it would be a
> matter of local policy or preference.  The wheel group in BSD means
> "these users are allowed to su to root".  If your news user will be set
> up with no working password and you won't ever be logging in as that
> user, just su'ing to it (that's how I do it) then having it in the wheel
> group is totally unnecessary.  If you actually log in to the system as
> news, then you probably do want it in wheel, so you can su to root when
> necessary.

Okay, that *was* how the news user was set up in FreeBSD originally,
so I would have to su to root, then su to the news user.  What I do
now is log in remotely as rebecca.  Then I su to news, not root.  My
users (the whole handful of them) have shell accounts on another
machine, not the news server.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50127
Author: Jeremy
Date: Thu, 25 Jan 2001 07:21
17 lines
1420 bytes
Rebecca Ore  <rebecca@ogoense.net> wrote:

> Okay, that *was* how the news user was set up in FreeBSD originally,
> so I would have to su to root, then su to the news user.  What I do
> now is log in remotely as rebecca.  Then I su to news, not root.

I su to news via root, with a shell alias not entirely unlike:

  alias news="su -m root -c 'su -m news -c \"env ZDOTDIR=$HOME zsh\"'"

This gets me a shell as news, but my own shell startup files and such.
That's the FreeBSD version; its much shorter on Solaris, where it works
without the env nonsense.  FreeBSD's su didn't seem to preserve that.

-- 
Jeremy  |  jeremy@exit109.com
Re: If only the wheel group can su to root
#50149
Author: Jack Bryans
Date: Fri, 26 Jan 2001 00:04
8 lines
1386 bytes
The way I like to deal w/this, on a newserver w/only admin logins, is to put
newsadmin(s) in group news and include /usr/local/news/bin in their PATH.
It's very seldom necessary to su at all, which satisfies my stodgy
preference for su minimization.  User news' passwd can be shared
w/newsadmin(s) w/o giving all of them root access.

Jack
Re: If only the wheel group can su to root
#50156
Author: Rebecca Ore
Date: Fri, 26 Jan 2001 03:55
31 lines
2523 bytes
Jeremy <jeremy@exit109.com> writes:

> Rebecca Ore  <rebecca@ogoense.net> wrote:
> 
> > Okay, that *was* how the news user was set up in FreeBSD originally,
> > so I would have to su to root, then su to the news user.  What I do
> > now is log in remotely as rebecca.  Then I su to news, not root.
> 
> I su to news via root, with a shell alias not entirely unlike:
> 
>   alias news="su -m root -c 'su -m news -c \"env ZDOTDIR=$HOME zsh\"'"
> 
> This gets me a shell as news, but my own shell startup files and such.
> That's the FreeBSD version; its much shorter on Solaris, where it works
> without the env nonsense.  FreeBSD's su didn't seem to preserve that.

I gave news a .bashrc of its own with the path and manpath set to use
the news stuff.  Root doesn't have that set (nor does it use bash as a
shell in NetBSD).  Is there a problem with this?

My next project seems to be setting up limits and authentications for
my pyrophore shell users (the whole handful of them).  Then I have to
set up something for people who just have news accounts and who are
logging in as news users from their own dialups, who'll just be
posting to local, restricted, private groups, maybe also to net.* if
they're willing to be good about it.

-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50157
Author: Rebecca Ore
Date: Fri, 26 Jan 2001 04:20
18 lines
1939 bytes
Jack Bryans <jbryans@csulb.edu> writes:

> The way I like to deal w/this, on a newserver w/only admin logins, is to put
> newsadmin(s) in group news and include /usr/local/news/bin in their PATH.
> It's very seldom necessary to su at all, which satisfies my stodgy
> preference for su minimization.  User news' passwd can be shared
> w/newsadmin(s) w/o giving all of them root access.

Putting news in wheel allows su, but maybe it would be better to take
news out of wheel.  I've got the PATh and MANPATH set up to be useful.

Wheel to be able to read /var/logs is convenient, though.


-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50159
Author: Jeremy
Date: Fri, 26 Jan 2001 05:10
19 lines
1549 bytes
Rebecca Ore  <rebecca@ogoense.net> wrote:

> I gave news a .bashrc of its own with the path and manpath set to use
> the news stuff.  Root doesn't have that set (nor does it use bash as a
> shell in NetBSD).  Is there a problem with this?

Personal preference.  I make one set of shell startup files that works
on all the OSes I use, on all the machines I use, and for all the users
I su to (typically only root and news), and then distribute them with a
script to all the machines I log into (which is quite a few).  That way
I have only the one set of files to worry about, and get the same
environment everywhere.

I end up with a bunch of "if" blocks to account for OS differences and
such, but it works out well.

-- 
Jeremy  |  jeremy@exit109.com
Re: If only the wheel group can su to root
#50160
Author: Jeremy
Date: Fri, 26 Jan 2001 05:14
22 lines
1804 bytes
Jack Bryans  <jbryans@csulb.edu> wrote:

> The way I like to deal w/this, on a newserver w/only admin logins, is
> to put newsadmin(s) in group news and include /usr/local/news/bin in
> their PATH.  It's very seldom necessary to su at all, which satisfies
> my stodgy preference for su minimization.  User news' passwd can be
> shared w/newsadmin(s) w/o giving all of them root access.

That's how I used to work.  I swore by it.  Then I became uncomfortable
with my account always having write access to everything; I never had
much in the way of disasters, but the potential is there.  Also, since
the news group tends to have write access to a lot of stuff, it creates
another point of vulnerability in that if your account is compromised,
someone can do a great deal of damage even without getting root.

I do put the news/bin directory in my path, though, so I can run the
informational-type stuff as myself and only have to su when I need to
actually change something.

-- 
Jeremy  |  jeremy@exit109.com
Re: If only the wheel group can su to root
#50167
Author: Rebecca Ore
Date: Fri, 26 Jan 2001 09:23
25 lines
2100 bytes
Jeremy <jeremy@exit109.com> writes:

> Rebecca Ore  <rebecca@ogoense.net> wrote:
> 
> > I gave news a .bashrc of its own with the path and manpath set to use
> > the news stuff.  Root doesn't have that set (nor does it use bash as a
> > shell in NetBSD).  Is there a problem with this?
> 
> Personal preference.  I make one set of shell startup files that works
> on all the OSes I use, on all the machines I use, and for all the users
> I su to (typically only root and news), and then distribute them with a
> script to all the machines I log into (which is quite a few).  That way
> I have only the one set of files to worry about, and get the same
> environment everywhere.
> 
> I end up with a bunch of "if" blocks to account for OS differences and
> such, but it works out well.

You win.  I'm just a hobby server and stuff.  


-- 
Rebecca Ore
http://www.ogoense.net/rebecca
Re: If only the wheel group can su to root
#50169
Author: Russ Allbery
Date: Fri, 26 Jan 2001 10:13
22 lines
2048 bytes
Rebecca Ore <rebecca@ogoense.net> writes:
> Jeremy <jeremy@exit109.com> writes:

>> Personal preference.  I make one set of shell startup files that works
>> on all the OSes I use, on all the machines I use, and for all the users
>> I su to (typically only root and news), and then distribute them with a
>> script to all the machines I log into (which is quite a few).  That way
>> I have only the one set of files to worry about, and get the same
>> environment everywhere.

>> I end up with a bunch of "if" blocks to account for OS differences and
>> such, but it works out well.

> You win.  I'm just a hobby server and stuff.  

Having the same dotfiles everywhere is really nice.  I do the same thing;
I have a little Perl script that distributes my dotfiles from my little
CVS repository to all the places I have accounts.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads