[comp.unix.questions] username problem

aaron@proxftl.UUCP (Aaron Zimmerman) (08/12/88)

I have a curious problem on my 3b1...

Login: aaron
Password:
$

[that is, I log in okay]

$ who am i
aaron      w4           Aug 12 08:01
$ passwd
Changing password for LOGIN
Permission denied.
$ passwd aaron
Old password:
<etc.>

So what's happenning is: somewhere along the line, some things think I'm
aaron, while others think I'm not. What's the story? I figure something might
be wrong with my /etc/group or my /etc/passwd. Could someone please post
examples showing what proper 'group' and 'passwd' files look like (or if you
have a better guess at what this problem is, I'd love to hear it). Thanks
much.


-- 
--
__   |  Aaron      |  Proximity Technology  |  #include <disclaimer.h>  |
     |  Charles    |   3511 N-E 22nd Ave.   |  #include <cute_quote.h>  |
__   |  Zimmerman  |    Fort Ladeda, Fla    |  cat flames > /dev/null   |

jbm@uncle.UUCP (John B. Milton) (08/15/88)

In article <578@proxftl.UUCP> aaron@proxftl.UUCP (Aaron Zimmerman) writes:
...
>$ passwd
>Changing password for LOGIN
>Permission denied.
>$ passwd aaron
>Old password:
><etc.>

My guess is that the /etc/utmp file is partially trashed. Try a who -a.
A re-boot should solve the problem for now, but you need to figure out what
is going on. I had similiar strangeness happen when I had getty running on a
pty. Do you have anything weird in your /etc/inittab? The reason I suspect
/etc/inittab, is because that is where the LOGIN comes from.

John
-- 
John Bly Milton IV, jbm@uncle.UUCP, n8emr!uncle!jbm@osu-cis.cis.ohio-state.edu
home: (614) 294-4823, work: (614) 459-7641; CP/M to MP/M, MS-DOS to OS/2

wnp@dcs.UUCP (Wolf N. Paul) (08/15/88)

In article <578@proxftl.UUCP> aaron@proxftl.UUCP (Aaron Zimmerman) writes:
 >I have a curious problem on my 3b1...
 >
 >Login: aaron
 >Password:
 >$
 >
 >[that is, I log in okay]
 >
 >$ who am i
 >aaron      w4           Aug 12 08:01
 >$ passwd
 >Changing password for LOGIN
 >Permission denied.
 >$ passwd aaron
 >Old password:
 ><etc.>
 >
 >So what's happenning is: somewhere along the line, some things think I'm
 >aaron, while others think I'm not. What's the story? I figure something might
 >be wrong with my /etc/group or my /etc/passwd.

sounds more like a problem with /etc/utmp to me, since passwd seems to think
you are "LOGIN", which is one of the entries in the utmp file, whereas it has
nothing to do with either /etc/passwd or /etc/group.

What does "who" show ?

It seens that either /bin/login does not properly update the utmp file, or
else /bin/passwd does not read it properly.
-- 
Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101
UUCP:     killer!dcs!wnp                 ESL: 62832882
DOMAIN:   wnp%dcs@killer.dallas.tx.us    TLX: 910-380-0585 EES PLANO UD

ditto@cbmvax.UUCP (Michael "Ford" Ditto) (08/16/88)

In article <578@proxftl.UUCP> aaron@proxftl.UUCP (Aaron Zimmerman) writes:
>I have a curious problem on my 3b1...

>$ who am i
>aaron      w4           Aug 12 08:01
>$ passwd
>Changing password for LOGIN

This means:

	1) You have more than one getty on /dev/window.
	2) You are currently logged in on the 2nd (or 3rd ...) window getty.
	3) The 1st window getty is idle (not logged in)

The passwd command is calling getlogin() or cuserid() which, upon noticing
that you are logged in on a window, searches /etc/utmp for the FIRST entry
for ANY window.  It finds the "LOGIN" process before it finds your "aaron"
entry and returns that.

It's an unfortunate side-effect of multiple console gettys.  It could be
fixed, but no one's done it yet.  I doubt AT&T will fix it because the
support folks probably don't want to support the multiple gettys.  Maybe
someday someone will make a shared library patch.
-- 
					-=] Ford [=-

	.		.		(In Real Life: Mike Ditto)
.	    :	       ,		ford@kenobi.cts.com
This space under construction,		...!ucsd!elgar!ford
pardon our dust.			ditto@cbmvax.commodore.com

jsp@sp7040.UUCP (John Peters) (08/16/88)

In article <578@proxftl.UUCP>, aaron@proxftl.UUCP (Aaron Zimmerman) writes:
<^> 
<^> So what's happenning is: somewhere along the line, some things think I'm
<^> aaron, while others think I'm not. What's the story? I figure something might
<^> be wrong with my /etc/group or my /etc/passwd. Could someone please post
<^> examples showing what proper 'group' and 'passwd' files look like (or if you
<^> have a better guess at what this problem is, I'd love to hear it). Thanks
<^> much.
<^> 
<^> __   |  Zimmerman  |    Fort Ladeda, Fla    |  cat flames > /dev/null   |

	Some programs get your user name from your pid by looking in the
passwd file while others look at the LOGNAME variable in your environment.
I would guess that others have some really bizare way of finding your logname.
Try checking your environment to see of LOGNAME is being set correctly.

					--  Johnnie  --

richard@uhccux.uhcc.hawaii.edu (Richard Foulk) (08/17/88)

} The passwd command is calling getlogin() or cuserid() which, upon noticing
} that you are logged in on a window, searches /etc/utmp for the FIRST entry
} for ANY window.  It finds the "LOGIN" process before it finds your "aaron"
} entry and returns that.
} 
} It's an unfortunate side-effect of multiple console gettys.  It could be
} fixed, but no one's done it yet.  I doubt AT&T will fix it because the
} support folks probably don't want to support the multiple gettys.  Maybe
} someday someone will make a shared library patch.

Perhaps making some links to /dev/window so that each getty can
refer to it by a different name would solve the problem.

Richard

davek@heurikon.UUCP (David Klann) (08/17/88)

In article <172@dcs.UUCP> wnp@dcs.UUCP (Wolf N. Paul) writes:
>In article <578@proxftl.UUCP> aaron@proxftl.UUCP (Aaron Zimmerman) writes:
> >I have a curious problem on my 3b1...
> >
> > [ discussion about changing password problem ]
>
>sounds more like a problem with /etc/utmp to me, since passwd seems to think
>you are "LOGIN", which is one of the entries in the utmp file, whereas it has
>nothing to do with either /etc/passwd or /etc/group.
>
>What does "who" show ?
>
>It seens that either /bin/login does not properly update the utmp file, or
>else /bin/passwd does not read it properly.
>-- 
>Wolf N. Paul * 3387 Sam Rayburn Run * Carrollton TX 75007 * (214) 306-9101

I've had this same problem on my UNIXpc.  I've seen other problems
(specifics escape me right now) with other commands that read /etc/utmp.
Seems that /bin/login, and/or /etc/init do not write /etc/utmp properly.

David Klann

ditto@cbmvax.UUCP (Michael "Ford" Ditto) (08/19/88)

In article <2255@uhccux.uhcc.hawaii.edu> richard@uhccux.UUCP (Richard Foulk) writes:
}} The passwd command is calling getlogin()
 [ ... ]
}} It's an unfortunate side-effect of multiple console gettys.
}
}Perhaps making some links to /dev/window so that each getty can
}refer to it by a different name would solve the problem.

Nope.  Good idea, though.  The problem seems to be that getlogin()
never even looks at the tty name at all when you're logged in on a
window.
-- 
					-=] Ford [=-

	.		.		(In Real Life: Mike Ditto)
.	    :	       ,		ford@kenobi.cts.com
This space under construction,		...!ucsd!elgar!ford
pardon our dust.			ditto@cbmvax.commodore.com