Gentoo Archives: gentoo-security

From: Robert Ullrich <roul76@×××.de>
To: "gentoo-security@l.g.o" <gentoo-security@l.g.o>
Subject: Re: [gentoo-security] SOLUTION: Prevent users to login directly
Date: Wed, 28 Jul 2004 19:55:55
Message-Id: 20040728215328.05988985@springfield
In Reply to: Re: [gentoo-security] SOLUTION: Prevent users to login directly by Klaus Wagner
1 On Wed, 28 Jul 2004 20:33:42 +0200
2 Klaus Wagner <klaus@××××××××××.net> wrote:
3
4 > >
5 > > # /emerge/.profile
6 > > if [ "`echo " $(who) "|grep "^\ $(whoami)\ "`" != "" ]; then
7 > > echo "Only login via 'su' permitted." >&2
8 > > exit 1
9 > > fi
10 > >
11 >
12 > Hi,
13 >
14 > keep in mind that if emerge user has write access to it's homedir
15 > (which is quite normal and needed by much applikations) the emerge
16 > user could easily change (replace) it's own .profile even if it has no write
17 > permissions to it.
18
19 Not if it's chown'ed root:portage and chmod'ed 440
20
21 > In my opinion sudo with a limited set of commands would be a more
22 > appropiate way to solve this and gives good logging if you want to know what has happened
23
24 I agree with that. But it's not part of the discussion how the 'admin'
25 or 'emerge' user commands can be limited or logged. It solves the problem.
26 Btw: The user 'emerge' has to sudo, still.
27
28
29 >
30 > mfg klaus
31 >
32 > --
33 > gentoo-security@g.o mailing list
34 >
35
36 --
37 gentoo-security@g.o mailing list

Replies

Subject Author
Re: [gentoo-security] SOLUTION: Prevent users to login directly Greg Watson <greg.watson@×××××××××××××.us>