Newsgroups: comp.sys.sgi Path: utzoo!utgpu!news-server.csri.toronto.edu!helios.physics.utoronto.ca!alchemy.chem.utoronto.ca!system From: system@alchemy.chem.utoronto.ca (System Admin (Mike Peterson)) Subject: Re: /etc/passwd permissions problems Message-ID: <1990Dec16.140559.24067@alchemy.chem.utoronto.ca> Organization: University of Toronto Chemistry Department References: <9012151655.AA06791@karron.med.nyu.edu> Date: Sun, 16 Dec 1990 14:05:59 GMT In article <9012151655.AA06791@karron.med.nyu.edu> karron@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@alchemy.chem.utoronto.ca Tel: (416) 978-7094 Fax: (416) 978-8775