[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cpx] Restrict Users from changing their password
- Subject: Re: [cpx] Restrict Users from changing their password
- From: Jonathan Duncan <jonathan@xxxxxxxxxx>
- Date: Fri, 10 Dec 2004 22:24:34 -0700 (MST)
On Fri, 10 Dec 2004, Jared Betteridge wrote:
Another option would be to write a wrapper for pw.  You'd rename pw to 
something like /usr/sbin/pw.real, and then write a wrapper script named 
/usr/sbin/pw that calls your custom programs when certain things happen and 
then passes on everything to the real pw.
Jared Betteridge
I tried your suggestion, I renamed pw and in place of it put a simple 
script to catch anything being passed to it to be logged to a file so I 
could find out what CPX was trying to send to pw.
However, with that script in place I go into CPX and change my password, 
and CPX tells me that the password has been changed, no errors, so I log 
out.  I try to log back in with the new password and it will not work. 
The old one still works.  I rename the real pw script back into place and 
then I am in fact able to change my password with CPX.
This is perhaps out of the scope of this list and off topic, so if that is 
the case just tell me and I will go sulk and try looking for answers 
elsewhere.
-rwxrwxrwx  1 root  wheel  309 Dec 11 04:34 pw
-rwxrwxrwx  1 root  wheel  24  Dec 11 04:35 blah.txt
-------------
#!/bin/sh
echo "$@" >> blah.txt;
-------------
From the command line it works:
/usr/sbin# pw var1 var2 var3 var4 var5 var6
/usr/sbin# cat blah.txt
var1 var2 var3 var4 var5 var6
/usr/sbin#
Then again, I am an ultra beginner with shell scripts.
Jonathan
======================================================================
This is <cpx@xxxxxxxxxxxxx>      <http://www.groupmail.org/lists/cpx/>
Before posting a question, please search the archives (see above URL).
Home |
Main Index |
Thread Index