This discussion is archived
2 Replies Latest reply: Sep 29, 2012 12:43 AM by user13843357 RSS

user initialization like issue - descriptors

user13843357 Newbie
Currently Being Moderated
greetings folks,
Problem description is: File descriptors that were set up in /etc/project does not take effect on a user

I have setup file descriptors to be 8192 to one of the projects and root. When i sudo su - db2user -c "/usr/bin/sh" db2user sees the descriptors set as 4096 but if i do sudo su db2user -c "/usr/bin/sh" ( just su without su - ) i see the 8192 getting in effect.Further, i tried removing the .profile of that user and logging in results were the same. I wonder if there are anyother initializations getting my way and which i'm obviously missing.
I tried creating another user and assigned it to the same project which the db2user is part of. That user does not have issues and the correct descriptor values (8192) are shown to him.
What other initializations takes place apart from the standard /etc/profile, .login, .profile, .bashrc, .kshrc, .cshrc ?
Is there a way of making a user login verbose to see what initilizations are taking place ?
what could it be the cause of the project settings not coming into place for the db2user when he logs in using a su - ?
thanks in advance.
  • 1. Re: user initialization like issue - descriptors
    muvvas Explorer
    Currently Being Moderated
    Hi will you please provide the /etc/project file O/P

    have you added the db2user in the project file,I feel you have added only the root user in /etc/project file

    as you mention the commands su user and su - user both behave in different ways

    su - user :: will initialize the users environment variables
    su user :: it will not initialize the user profile or environment variables

    my /etc/project file

    bash-3.2# cat /etc/project
    system:0::::
    user.root:1::root::project.max-msg-ids=(privileged,2560,deny);project.max-sem-ids=(privileged,3072,deny),(privileged,3072,deny);project.max-shm-ids=(privileged,3072,deny);project.max-shm-memory=(privileged,8554512384,deny)
    noproject:2::::
    default:3::::
    group.staff:10::::
    user.db2inst2:100::::project.max-msg-ids=(privileged,2560,deny);project.max-sem-ids=(privileged,3072,deny);project.max-shm-ids=(privileged,3072,deny);project.max-shm-memory=(privileged,8554512384,deny)
    db2inst2:101::::project.max-shm-memory=(privileged,8554512384,deny)

    here i have added the both users root and db2inst2
  • 2. Re: user initialization like issue - descriptors
    user13843357 Newbie
    Currently Being Moderated
    Thanks muvvas,

    Yes affirmative, i have added the db2user to the projects file. If i don't us "su -" db2user gets the descriptors as 8192. When i use my login i get 256 as the descriptors. Yes, root gets it as he also has been set to get 8192.
    I created a completely new user and added it to the project which db2user is part of as the descriptors are set. Then that user also gets 8192 descriptors.
    TA

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points