AIX Open Source

AIX Open Source

Share your experiences and connect with fellow developers to discover how to build and manage open source software for the AIX operating system

 View Only
Expand all | Collapse all

3004-687 User "???" does not exist.

  • 1.  3004-687 User "???" does not exist.

    Posted Wed July 09, 2025 01:03 PM

    Hello,

    For AIX 7300-03-00 i get below error.

    root@hostname:/root
    > su - automation
    automation@hostname[/home/automation]sudo su -
    [YOU HAVE NEW MAIL]
    3004-687 User "automati" does not exist.

    When I'm trying to "sudo su -" from user with more than 8 characters then its appear. Basically I'm able to switch to root but anyway this error looks confusing.

    Because its saying that user "automati" instead of "automation" .

    In the truss dump we found something like this :

    [...]
    12059046: 32768295: 5.3506: kread(0, 0xF09C4D40, 4096)11076046: 24969701: 5.4668: kwrite(1, 0x0FFFFFFFFFFFE8A0, 58) = 58 = 58
    12059046: a u t o m a t i p t s / 5 J u l 0 9 1
    ^^^^^^^^^^^^^^^ <-- !!!
    12059046: 1 : 3 9 ( 2 1 3 . 2 3 . 1 2 2 . 1 1 3 )\n


    11076046: a u t o m a t i p t s / 5 J u l 0 9 1
    ^^^^^^^^^^^^^^^ <-- !!!
    11076046: 1 : 3 9 ( 2 1 3 . 2 3 . 1 2 2 . 1 1 3 )\n
    12059046: 32768295: 5.4670: kioctl(1, 22528, 0x00000000, 0x00000000)11076046: 24969701: 5.4670: close(1) = 025 ENOTTY


    12059046: 32768295: 5.4672: kread(0, 0xF09C4D40, 4096) = 0
    = 0
    12059046: 32768295: 5.4674: close(0) = 011076046: 24969701: 5.4675: checkpnt_block(0x0000000000000000, 17) = 0


    11076046: 24969701: 5.4677: checkpnt_block(0x0000000 = 900000, 18)1323
    12059046: a u t o m a t i\n
    ^^^^^^^^^^^^^^^ <-- !!!
    = 9
    13238722: a u t o m a t i\n
    ^^^^^^^^^^^^^^^ <-- !!!
    [...]

    So we think that sudo package has some problem

    Sudo version installed is : 1.9.16p2-1 so the latest one.

    I couldn't find similar problem anywhere. Maybe somebody has something to add here that would be great :)

    Regards



    ------------------------------
    Tomasz Boruszek
    ------------------------------


  • 2.  RE: 3004-687 User "???" does not exist.

    Posted Thu July 10, 2025 02:45 AM

    What is max_logname set to (lsattr -El sys0 -a max_logname)?



    ------------------------------
    Lech Szychowski
    ------------------------------



  • 3.  RE: 3004-687 User "???" does not exist.

    Posted Thu July 10, 2025 03:03 AM

    > lsattr -El sys0 -a max_logname
    max_logname 255 Maximum login name length at boot time True



    ------------------------------
    Tomasz Boruszek
    ------------------------------



  • 4.  RE: 3004-687 User "???" does not exist.

    Posted Mon July 14, 2025 07:08 PM
    Edited by Chris Gibson Mon July 14, 2025 07:08 PM

    What do these commands show?

    lsattr -El sys0 -a max_logname

    cat -v /etc/passwd | grep auto
    su - automation -c whoami
    su - automation -c "echo $LOGNAME"



    ------------------------------
    Chris Gibson
    ------------------------------



  • 5.  RE: 3004-687 User "???" does not exist.

    Posted Tue July 15, 2025 08:05 AM
    Edited by Tomasz Boruszek Tue July 15, 2025 08:05 AM

    > lsattr -El sys0 -a max_logname
    max_logname 255 Maximum login name length at boot time True

    > su - automation -c whoami
    automation

    cat -v /etc/passwd | grep auto
    automation:!:739:1:Ansible User:/home/automation:/usr/bin/ksh


    > su - automation -c "echo $LOGNAME"
    root



    ------------------------------
    Tomasz Boruszek
    ------------------------------



  • 6.  RE: 3004-687 User "???" does not exist.

    Posted Tue July 15, 2025 08:42 AM

    > > su - automation -c "echo $LOGNAME"
    > root

    I believe you should have used signle quotes, not double ones. With double quotes, it is the root shell that expands $LOGNAME - and we want to see this env var in automation user shell .

    su - automation -c 'echo $LOGNAME'



    ------------------------------
    Lech Szychowski
    ------------------------------



  • 7.  RE: 3004-687 User "???" does not exist.

    Posted Tue July 15, 2025 09:02 AM

    Indeed:

    > su - automation -c 'echo $LOGNAME'
    automation


    Listing user also show short username:

    > w
      02:58PM   up   1:41,  1 users,  load average: 0.00, 0.02, 0.01
    User     tty          login@       idle      JCPU      PCPU what
    automati pts/2       02:58PM          0         0         0 w



    ------------------------------
    Tomasz Boruszek
    ------------------------------



  • 8.  RE: 3004-687 User "???" does not exist.

    Posted Tue July 15, 2025 07:09 AM

    It's either a problem with sudo or you haven't rebooted after setting max_logname to 255.



    ------------------------------
    José Pina Coelho
    IT Specialist at Kyndryl
    ------------------------------



  • 9.  RE: 3004-687 User "???" does not exist.

    Posted Tue July 15, 2025 07:23 AM

    System was restarted already couple times, so unfortunately not this.



    ------------------------------
    Tomasz Boruszek
    ------------------------------



  • 10.  RE: 3004-687 User "???" does not exist.

    Posted Tue July 15, 2025 10:02 AM

    > Basically I'm able to switch to root but anyway this error looks confusing.

    Ok, so sudo works but it's just the messages you're worried about?

    > > su - automation
    > automation@hostname[/home/automation]sudo su -
    > [YOU HAVE NEW MAIL]
    > 3004-687 User "automati" does not exist.

    I think all these messages are produced by root shell and sudo does not have anything to do with them. The message about nonexting user is displayed after the message about mail and the latter is almost certainly displayed as a result of inerpreting the shell configuration files (profile etc).
    What does get displayed when you run "sudo su -" as a user that has its name no longer than 8 chars?



    ------------------------------
    Lech Szychowski
    ------------------------------



  • 11.  RE: 3004-687 User "???" does not exist.

    Posted Tue July 15, 2025 10:42 AM

    Sudo works, its just only message issue. Which I can live with.

    With user with 8 and less characters long there is no such error.



    ------------------------------
    Tomasz Boruszek
    ------------------------------