[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cpx] Restrict Users from changing their password



It doesn't look like you passed the information on to the real pw.  If
you are just looking to log for a while, your script should look like
this:

#!/bin/sh

echo "$@" >> /path/to/blah.txt
exec /path/to/real/pw $@

	--Bruce

On Fri, 2004-12-10 at 22:24 -0700, Jonathan Duncan wrote:
> 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).
-- 
Bruce Armstrong <bruce@xxxxxxxxxxxxxxxxxxxxx>

======================================================================
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
Match: Format: Sort by:
Search: