Subject: Re: Strange passwd issue
To: Jeremy C. Reed <reed@reedmedia.net>
From: Markus Illenseer <markus@core.de>
List: netbsd-users
Date: 01/09/2004 20:04:15
> Do you get the permission denied error when ktracing it?

 Yes, still.

> What happens after loading the NLS files?

 Nothing, it exits.

 Now, I have done some more investigations:


("gong" is a test user)
root:~#su - gong

gong: {1} passwd
passwd: Permission denied

gong: {2} passwd gong
Changing local password for gong.
Old password:
New password:
Retype new password:
gong: {3}


 Aha! The context seems to be wrong! Checking with "login":


root:~#login
login: gong
Password:
Last login: Fri Jan  9 19:38:44 2004 on ttyp5
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
        The NetBSD Foundation, Inc.  All rights reserved.
Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
        The Regents of the University of California.  All rights reserved.

NetBSD 1.6.2_RC2 (BEAVER) #1: Sun Dec 28 21:54:14 CET 2003

gong: {1} passwd
Changing local password for gong.
Old password:
New password:
Retype new password:
gong: {2}


 Now, what is the difference between "su - gong" and _then_ "passwd" and
"login" and "passwd" ? The environment variables "LOGNAME" and "SU_FROM"
are set / unset. But manually setting / unsetting does not help.

 Does that mean, I cannot change a users password using "su -" beforehand?
Is there a config file for this behaviour?


--
Markus Illenseer