Gentoo Archives: gentoo-security

From: Klaus Wagner <klaus@××××××××××.net>
To: Robert Ullrich <roul76@×××.de>
Cc: gentoo-security@l.g.o
Subject: Re: [gentoo-security] SOLUTION: Prevent users to login directly
Date: Wed, 28 Jul 2004 18:35:20
Message-Id: 20040728183342.GA15680@aeon.user.lan.at
In Reply to: Re: [gentoo-security] SOLUTION: Prevent users to login directly by Robert Ullrich
1 >
2 > # /emerge/.profile
3 > if [ "`echo " $(who) "|grep "^\ $(whoami)\ "`" != "" ]; then
4 > echo "Only login via 'su' permitted." >&2
5 > exit 1
6 > fi
7 >
8
9 Hi,
10
11 keep in mind that if emerge user has write access to it's homedir
12 (which is quite normal and needed by much applikations) the emerge
13 user could easily change (replace) it's own .profile even if it has no write
14 permissions to it.
15
16 In my opinion sudo with a limited set of commands would be a more
17 appropiate way to solve this and gives good logging if you want to know what has happened
18
19 mfg klaus
20
21 --
22 gentoo-security@g.o mailing list

Replies