--
Regards,
Richard Jackson George Mason University
UNIX Systems Engineer UCIS / ISO
Computer Systems Engineering
----------
>From mcrowley_at_mhc.mtholyoke.eduWed Jul 19 12:02:07 1995
Date: Wed, 19 Jul 1995 06:20:04 -0400 (EDT)
From: "Michael A. Crowley" <mcrowley_at_mhc.mtholyoke.edu>
To: Brian Weaver <weaver_at_pr1.k12.co.us>
Subject: Re: Disable chfn under 3.2A?
Write a wrapper program for the passwd program that will not
allow the -f option to be passed along. You can put the real
passwd program somewhere else.
There are a couple of choices: you can simply put the passwd
program in an obscure place which the wrapper program can find.
Smart users might find this. You could run the wrapper program
as sgid for some group that you put the original passwd program
in and remove the other execute permissions from the original.
The original is suid to root anyway.
We took another route here -- we let the people change their
finger information, but when we create accounts, the original
passwd information is put into another file that users can't change.
Mike
----------
>From zen_at_bf.rmit.edu.auWed Jul 19 12:02:49 1995
Date: Wed, 19 Jul 1995 17:20:09 +1000 (EST)
From: Stuart 'Zen' Bishop <zen_at_bf.rmit.edu.au>
To: Brian Weaver <weaver_at_pr1.k12.co.us>
Cc: OSF managers <alpha-osf-managers_at_ornl.gov>
Subject: Re: Disable chfn under 3.2A?
On Tue, 18 Jul 1995, Brian Weaver wrote:
> I need to stop users from changing their finger information on
> our server running OSF 3.2A. The problem is chfn and passwd are
> the same program, linked together, so I can get rid of chfn, but
> passwd -f still works. We are running enhanced security so I cannot
> simply use another passwd program, unless you know of one that works
> with enhanced security. Any ideas? So far digital tech support is
> stumped on this one..
Password needs to be run as root to work. You write a password replacement
(like the one included below) that simply makes sure that the -f option
has not ben passed, and then calls the real password. The replacement
password is work executable and suid root. The passwd program that
came with osf/1 is set to executable to root only, and is no longer suid.
_____
// // __ For a good time call http://www.bf.rmit.edu.au/~zen //
// / \ I\ I zen_at_rmit.edu.au //
// (-- I \I Unix Systems Administrator //
// \__/ I I alias Stuart Bishop Business Faculty, RMIT //
((_______________________________________________________________________//
/*
* Written by Michael Barnett, 8/11/94.
*
* There is no simple way to stop users from running the standard
* /bin/passwd binary with the -f option, so use this as a wrapper.
*
* gcc -s -o passwd.no-f passwd.no-f.c
* mv /bin/passwd /bin/passwd.with-f <- DO ONCE ONLY!
* cp passwd.no-f /bin
* chmod 4711 /bin/passwd.no-f
* ln /bin/passwd.no-f /bin/passwd
*/
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
main(int argc, char *argv[])
{
if ( argc > 1 )
if ( ! strcmp(argv[1], "-f") )
{
fprintf(stderr, "This feature has been disabled.\n");
fprintf(stderr, "Contact the system administrator if you need to change your account details.\n");
exit(1);
}
execv("/bin/passwd.with-f", argv);
}
----------
Date: Tue, 18 Jul 1995 23:01:59 -0700
From: Mike Iglesias <iglesias_at_draco.acs.uci.edu>
To: Brian Weaver <weaver_at_pr1.k12.co.us>
Subject: Re: Disable chfn under 3.2A?
You might try editing the passwd binary with emacs and searching for
'fs'. I did, and found it shortly after the "usage" message in the
binary. Change it to 's\0' and see if that prevents people from using
-f.
We did something similar on our student systems (suns) that keeps them
from messing with their passwd gecos field.
Mike
-- Brian
------------------------------------------------------------------------
Brian Weaver weaver_at_pr1.k12.co.us
System Administrator 970-490-3683
PoudreR1
PGP key available.
Key fingerprint = 1D 9A 5F 9C 2D B3 D0 45 85 70 B5 4E E0 80 25 42
My opinions are my own and not that of the Poudre R1 School District.
Received on Wed Jul 19 1995 - 20:29:45 NZST
This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT