tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Gary W. Perkins" <perkins () uscolo ! edu>
To: tru64-unix-managers
Subject: [SUMMARY] disable chfn command
Date: Mon, 04 Sep 1995 19:56:05 +0000	[thread overview]
Message-ID: <96075323306427.tru64-unix-managers.marc@archive.invalid> (raw)

Thanks for the quick response.  I can usually count on the right answer 
from others on this list _days_ before I can get an answer (not always
right) from DEC support.

Received responses from:
Anthony D'Atri <aad@nwnet.net>
Randall S. Winchester <rsw@eng.umd.edu>
Don Newcomer <newcomer@dickinson.edu>
Kent Arnott <karnott@falcon.tamucc.edu>
Todd Kover <kovert@umiacs.UMD.EDU>
Ilja Hallberg <hallberg@s3.kth.se>
David W Lloyd <dwl@cs.strath.ac.uk>
Phred is Dead <layher@grumpy.emich.edu>
Jon Buchanan <Jonathan.Buchanan@ska.com>



My original question was:
I would like to disable general use of the chfn command.

I tried changing its mode to 700, but that also disables the passwd command.
Has anyone out there figured this one out?

The answers were variations of this one from Todd Kover:

passwd, chfn, and chsh all invoke the same binary that behave differently
based on the name.  You can unlink the chfn (and use ln to relink it later
if you so desire (see ln(1)), but users can still use a command line option
to passwd to do the same thing.

Your only choice is really to replace the passwd program with something
else.

David Lloyd gave me a quick fix:

chfn, chsh and passwd are generally hard links to the same file.  If you want
to disable chfn only you could use the following:

cp chfn chfn.tmp
rm chfn
mv chfn.tmp chfn
chmod 700 chfn

I have disabled chfn as above, and am looking for new versions of passwd 
as time allows.  Pointers to source code would be appreciated.

Thanks again to all.

Gary W. Perkins      perkins@meteor.uscolo.edu
University of Southern Colorado    (719) 549-2566
-------------------------------------------------------------------------

                 reply	other threads:[~1995-09-04 19:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox