Groups > SUSE Linux > SUSE Linux Enterprise server > cannot modify ulimit -n option as "oracle" with "su -" cmd.




cannot modify ulimit -n option as "oracle" with
"su -" cmd.

cannot modify ulimit -n option as "oracle" with "su -" cmd.
Thu, 06 Jul 2006 19:04:13 GMT
I'm installing oracle 10gR2 on Suse 9 Enterprise 64 bit.
Part of the installation is to configure the ulimit settings for oracle.

When I follow the instructions for setting ulimit options, the "ulimit
-n"
option only works when I log in directly into the machine... when I su -
oracle the ulimit setting fails and says

 -bash: ulimit: open files: cannot modify limit: Operation not permitted

this is because the instructions tell me to add the following
to /etc/profile.local

   if [ $USER = oracle ]; then
     if [ $SHELL = /bin/ksh ]; then
        ulimit -p 16384
        ulimit -n 65536
     else
        ulimit -u 16384
        ulimit -n 65536
     fi
  fi

These are the additional instructions that I have already followed!

1. cat >> /etc/security/limits.conf << EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

2. cat >> /etc/pam.d/login << EOF
session required /lib/security/pam_limits.so
EOF

Can anyone help me get the ulimit -n option to work after I "su -" to
oracle?

TIA
-peter
Post Reply
cannot modify ulimit -n option as "oracle" with "su -" cmd.
Fri, 07 Jul 2006 09:08:24 GMT
> I'm installing oracle 10gR2 on Suse 9 Enterprise 64 bit.
> Part of the installation is to configure the ulimit settings for oracle.
> 
> When I follow the instructions for setting ulimit options, the "ulimit
-n"
> option only works when I log in directly into the machine... when I su -
> oracle the ulimit setting fails and says
> 
>  -bash: ulimit: open files: cannot modify limit: Operation not permitted
> 
> this is because the instructions tell me to add the following
> to /etc/profile.local
> 
>    if [ $USER = oracle ]; then
>      if [ $SHELL = /bin/ksh ]; then
>         ulimit -p 16384
>         ulimit -n 65536
>      else
>         ulimit -u 16384
>         ulimit -n 65536
>      fi
>   fi
> 
> These are the additional instructions that I have already followed!
> 
> 1. cat >> /etc/security/limits.conf << EOF
> oracle soft nproc 2047
> oracle hard nproc 16384
> oracle soft nofile 1024
> oracle hard nofile 65536
> EOF
> 
> 2. cat >> /etc/pam.d/login << EOF
> session required /lib/security/pam_limits.so
> EOF
> 
> Can anyone help me get the ulimit -n option to work after I "su
-" to oracle?
> 
> TIA
> -peter
> 

You need to also edit /etc/pam.d/xdm and /etc/pam.d/su and /etc/pam.d/ssh
to check that "session required /lib/security/pam_limits.so" is
present in
Post Reply
cannot modify ulimit -n option as "oracle" with "su -" cmd.
Mon, 10 Jul 2006 13:39:16 GMT
> > I'm installing oracle 10gR2 on Suse 9 Enterprise 64 bit.
> > Part of the installation is to configure the ulimit settings for
oracle.
> > 
> > When I follow the instructions for setting ulimit options, the
"ulimit -n"
> > option only works when I log in directly into the machine... when I su
-
> > oracle the ulimit setting fails and says
> > 
> >  -bash: ulimit: open files: cannot modify limit: Operation not
permitted
> > 
> > this is because the instructions tell me to add the following
> > to /etc/profile.local
> > 
> >    if [ $USER = oracle ]; then
> >      if [ $SHELL = /bin/ksh ]; then
> >         ulimit -p 16384
> >         ulimit -n 65536
> >      else
> >         ulimit -u 16384
> >         ulimit -n 65536
> >      fi
> >   fi
> > 
> > These are the additional instructions that I have already followed!
> > 
> > 1. cat >> /etc/security/limits.conf << EOF
> > oracle soft nproc 2047
> > oracle hard nproc 16384
> > oracle soft nofile 1024
> > oracle hard nofile 65536
> > EOF
> > 
> > 2. cat >> /etc/pam.d/login << EOF
> > session required /lib/security/pam_limits.so
> > EOF
> > 
> > Can anyone help me get the ulimit -n option to work after I "su
-" to
oracle?
> > 
> > TIA
> > -peter
> > 
> 
> You need to also edit /etc/pam.d/xdm and /etc/pam.d/su and /etc/pam.d/ssh
> to check that "session required /lib/security/pam_limits.so" is
present in
> them also.


Worked like a charm.. thanks!
-peter
Post Reply
about | contact