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

Different ulimits with sudo and su

  • 1.  Different ulimits with sudo and su

    Posted Thu September 01, 2022 11:14 AM
    Hi Community,

    does anyone know why the ulimits differ when using sudo or su?

    # su shows unlimited as string (su - user01)
    user01@aixserver01 /home/user01# ulimit -a
    time(seconds) unlimited
    file(blocks) unlimited
    data(kbytes) unlimited
    stack(kbytes) 2097152
    memory(kbytes) unlimited
    coredump(blocks) unlimited
    nofiles(descriptors) unlimited
    threads(per process) unlimited
    processes(per user) unlimited

    # sudo shows the system-wide limit as integer (sudo -iu user01)
    user01@aixserver01 /home/user01# ulimit -a
    time(seconds) unlimited
    file(blocks) unlimited
    data(kbytes) unlimited
    stack(kbytes) 2097152
    memory(kbytes) unlimited
    coredump(blocks) unlimited
    nofiles(descriptors) unlimited
    threads(per process) unlimited
    processes(per user) 10000

    # System limit
    # lsattr -El sys0 |grep maxuproc
    maxuproc 10000 Maximum number of PROCESSES allowed per user True

    Best regards
    Niklas​


    ------------------------------
    Niklas
    System Engineer UNIX and Linux on Power
    ------------------------------