SUMMARY: /bin/passwd weirdness

From: David Mostardi (david@capmkt.capmkt.com)
Date: Mon Dec 06 1993 - 19:32:40 CST


SUMMARY
=======

>> 1. Fred logs into ruby, starts OpenWin. In an xterm,
>> he types "passwd". He gets "permission denied". (Huh?)
>> 2. In yet another xterm, Fred types "passwd" and gets
>> "passwd: you don't have a login name". Fred types "who am i"
>> and the reply is "ruby! ttyp7 Dec 2 1993"

        
Thanks to Torsten Metzner for the correct answer. It turns out
that Fred had the following line in his .Xdefaults:

        XTerm*utmpInhibit: off

this line prevents a record of the pseudo-terminal from being
written to the /etc/utmp file. The /bin/passwd binary checks
to /etc/utmp to see if the user has permissions to write to the
terminal -- but permission is denied because no record of this
terminal was ever written there.

>> At first glance it might seem to be an X-related problem,
>> but then why can't root-spawned users change their passwords
>> in a non-xterm window?

Although su allows David to become Fred, the owner of the terminal
is still "david", and "passwd" then fails -- because Fred needs
to own the terminal before "passwd" will work.

......

Thanks to:
Torsten Metzner <tom@uni-paderborn.de>
stern@sunrise.East.Sun.COM (Hal Stern)
David Deaves <David.Deaves@cbr.atr.com.au>
Frederic Piard <frederic_piard@kangourou.erli.gsi.fr>
mele@syl.nj.nec.com (Elaine Mele)
bwalker@hns.com (Bill Walker)

TEXT OF ORIGINAL QUESTION
=========================
Two possibly related problems below. We run SunOS 4.1.3
and NIS. "slag" is the NIS server, "ruby" and "bill"
are NIS clients.

1. Fred logs into ruby, starts OpenWin. In an xterm,
   he types "passwd". He gets "permission denied". (Huh?)
   Similar tries in similar xterms yield similar results.

   However, "passwd" works properly if:

        - Fred rlogins into bill or slag
        - Fred opens a command tool and runs "passwd"
        - Fred exits out of OpenWin and runs "passwd"
                from the console
        - Fred rlogins to ruby from another host

   If I login to ruby, "passwd" works properly.
   But, if I am root on ruby, and become any user with "su",
   the "passwd" command results in "permission denied".

2. In yet another xterm, Fred types "passwd" and gets
   "passwd: you don't have a login name". Fred types "who am i"
   and the reply is

        ruby! ttyp7 Dec 2 1993

   The error message makes sense now, but why doesn't "who"
   register a user name?

At first glance it might seem to be an X-related problem,
but then why can't root-spawned users change their passwords
in a non-xterm window? What the heck is going on?

-------------------------------------------------------------------
David Mostardi Email: david@capmkt.com
Network & Systems Administrator Phone: (510) 540-6400
Capital Market Technology, Inc. FAX: (510) 540-5505
1995 University Ave. #390, Berkeley CA 94704



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:08:31 CDT