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

Re: passwd-error under su-session



On Sat, Dec 12, 1998 at 01:01:27PM -0600, Stephen Langasek wrote:
> On Wed, 9 Dec 1998 leich@wiwi.uni-marburg.de wrote:
> 
> > I needed to write an expect-script to do "su -l <user>" and execute
> > "passwd" for that user. The problem is, that the passwd tries to change
> > the passwd for the user who launched "su -l <user>" and not for the one
> > launching passwd.
> 
> The problem is that the pamified version of passwd that you have (Simple
> PAM Apps, IIRC--it's been a while) tries to identify the user via their
> login info, rather than using their current uid, and only root is
> permitted to override.

That's right.  It's an implementation decision.

> There are versions available which do what you
> want, but I don't know which would be appropriate for your
> situation--there are probably going to be library conflicts (glibc; pam
> itself) with some of the newer offerings (perhaps even from source).  I
> could be completely wrong; the only RH4.2 machines I have on hand have
> have been so thoroughly reworked in any case that nothing I have is likely
> to be of any use.  The passwd program I have, IAC, is a
> passwd-0.50 rpm.  Hopefully someone else here will have a more definite
> answer.
> 
> Speaking as I programmer, I'd say the easiest solution is to download the
> source to the version you already have, change those couple of lines, and
> recompile... :)

I suggest you to reorganize your script so that you will invoke
`passwd username' under root privileges.

Best regards
					Andrey V.
					Savochkin



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