lkml.org 
[lkml]   [1999]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectKernel-dependent utmp??

Hello,

Two of my systems have Red-Hat release 3.0.3. I just encountered a problem
which I don't understand and it's making it impossible for users to
change their passwords. `passwd` uses getlogin() to confirm the user's
name.

Given:

main()
{
puts(getlogin());
}

This returns the __first__ name in /var/run/utmp, rather than the
correct one. In other words, it does not read the file, matching
the UID to the last UID of the same value in the file.

If I truncate the file to zero length `>/var/run/utmp`, then login,
the above program prints the correct login name. If I log out and
log in again under another account, the above program prints the
name of the previous person logged in, i.e., the first record in
the file.

First I changed all the login utilities to make sure that they were
all manipulating /var/run/utmp using the same structure definition.
Then I changed all the sysVinit stuff. Still the same problem.
Also I verified that /var/run/utmp increases in size by 768 bytes,
the structure size, every time a login occurs.

So; "What does this have to do with the Linux kernel?", you ask.
The system works correctly when booted from Linux version 2.1.16,
the previous kernel installed. The problem started when I installed
Linux 2.2.6. The 'C' runtime libraries were never changed.

To further explain the quandry, the __exact__ same root file-system,
with only the network configuration changed (host name, IP address)
runs fine on this system with the same kernel and even this kernel,
which is now a "scary hacked/patched" 2.3.13

Does anybody have a clue where else I should look --and how a change
in the kernel could possibly affect this stuff?

I need allow some users to change passwords!!

Cheers,
Dick Johnson
**** FILE SYSTEM WAS MODIFIED ****
Penguin : Linux version 2.3.13 on an i686 machine (400.59 BogoMips).
Warning : It's hard to remain at the trailing edge of technology.


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.028 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site