Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 66978 - the included /etc/profile doesnt work when username != root
Summary: the included /etc/profile doesnt work when username != root
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-10 07:08 UTC by Thijs Dalhuijsen
Modified: 2004-10-10 18:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thijs Dalhuijsen 2004-10-10 07:08:52 UTC
-- etc/profile:
     11 
     12 if [ `/usr/bin/whoami` = 'root' ]
     13 then

should be 
     11 
     12 if [ $UID = 0 ]
     13 then
or maybe even
$EUID = 0 
but i think (since its profile) the first...



Reproducible: Always
Steps to Reproduce:
1.change root to something else
2.login
3.echo $PATH



since imho one of the first things you do to up your security is change the name of 'root' its pretty 
severe, well, unhandy at least :)
Comment 1 SpanKY gentoo-dev 2004-10-10 18:08:49 UTC
this is already fixed in cvs ;)

if [ "$EUID" = 0 ] || [ "`/bin/whoami`" = 'root' ]; then