/etc/passwd permissions problems

System Admin Mike Peterson system at alchemy.chem.utoronto.ca
Mon Dec 17 01:05:59 AEST 1990


In article <9012151655.AA06791 at karron.med.nyu.edu> karron at cmcl2.nyu.edu writes:
>Why does everyone need to write /etc/passwd ? I thought all they
>needed was to read it !

This is/was used by installation scripts to test whether they have root
privileges - if the script can write on /etc/passwd (which it checked
with a "test -w /etc/passwd" in all the cases I've seen), it assumed it could
do what it wanted without permission problems. These days /etc/passwd
often has '-r--r--r--' permissions in the presence of YP/NIS, so scripts
that do this are going to fail. This avoids problems with 'who am i' vs
'whoami' to find out the effective uid, since the latter is only on BSD
systems.
-- 
Mike Peterson, System Administrator, U/Toronto Department of Chemistry
E-mail: system at alchemy.chem.utoronto.ca
Tel: (416) 978-7094                  Fax: (416) 978-8775



More information about the Comp.sys.sgi mailing list