Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#767 AIX: Login fails for non-root users

1.020
closed
Jamie Cameron
None
5
2003-05-03
2002-11-01
Anonymous
No

Platform: AIX 4.3.3, level 10, 64-bit
Install Dir: /usr/local/webmin-1.020

Default installation.
Initial admin user ID: admin
Created other users to user webmin, but these accounts
cannot log in.
The "admin" user can log out and log back in, no problem.

Discussion

  • Jamie Cameron
    Jamie Cameron
    2002-11-01

    Logged In: YES
    user_id=129364

    Do these new users have a password set?
    And what error message are they getting when they try to
    login - it is 'Login failed', or is there no error at all?

     
  • Jamie Cameron
    Jamie Cameron
    2002-11-01

    • assigned_to: nobody --> jcameron
     
  • Logged In: NO

    Hello;

    I have recently worked through this issue with AIX, where
    non-root users
    weren't able to authenticate.

    miniserv.pl checks for the type of shadow passord file and
    the check for
    AIX determines incorrectly that it uses PAM authentication
    (it comes to
    this conclusion when it sees the ":x:" in /etc/passwd).

    Anyway, I've updated 1.0.8.0 miniserv.pl to correctly handle
    this with this
    code:

    2206,2231d2205
    < elsif( $config{'shadow_file'} =~ /\/etc\/security\/passwd/ ) {
    < # Check password against AIX shadow file
    < $aix_user = $_[0];
    < $user_pass = $_[1];
    <
    < # read the AIX security passwd file
    < local $user = undef;
    < local $rv = 0;
    < open(SHADOW, $config{'shadow_file'});
    <
    < while(<SHADOW>) {
    < s/\s*$//;
    < if (/^\s*(\S+):/) {
    < if ( $1 eq $aix_user ) {
    < $_ = <SHADOW>;
    < if (/^\s*password\s*=\s*(\S+)\s*$/) {
    < $rv = $1 eq crypt($user_pass,
    $1) ? 1 : 0;
    < }
    < last;
    < }
    < }
    < }
    <
    < close(SHADOW);
    < return $rv;
    < }

    I also had to add an entry to miniserv.conf:

    passwd_file=/etc/security/passwd

    There may be other ways to handle this situation, but this
    seems to work.

    I hope this helps,

    Tom Griffing
    RHCE@swbell.net

     
  • Jamie Cameron
    Jamie Cameron
    2003-05-03

    Logged In: YES
    user_id=129364

    Thanks, I will include this in the next webmin release ..

     
  • Jamie Cameron
    Jamie Cameron
    2003-05-03

    • status: open --> closed