Sponsored Content
Operating Systems Solaris How to increase soft stack limit? Post 302727985 by GP81 on Wednesday 7th of November 2012 07:39:56 AM
Old 11-07-2012
First we must create new user account:
Code:
root@testserver # useradd -d /export/home/george -m george
64 blocks
root@testserver # passwd george
New Password:
Re-enter new Password:
passwd: password successfully changed for george
root@testserver # tail -1 /etc/passwd
george:x:102:1::/export/home/george:/bin/sh

Now we create new project and set new value for process.max-stack-size:
Code:
root@testserver # projadd user.george
root@testserver # projmod -sK "process.max-stack-size=(basic,16384k,deny)" user.george
root@testserver # tail -1 /etc/project
user.george:101::::process.max-stack-size=(basic,16777216,deny)
root@testserver # id -p george
uid=102(george) gid=1(other) projid=101(user.test)

As you can see, I didn't use any special command to assign this project for user george. It is possible, because I use special name for project "user.george". With this method I can also assign default project for group. I just must use "group.groupname".
In your example project is assigned to user george but it is not the default project.
You can check that with command projects. You should get something like this:
Code:
# projects
default accountusers

To set accountusers as default project for user george with your method you should add the folowing line in file /etc/user_attr
Code:
george::::project=accountusers

I'm not sure what was your intention, but you set max-stack-size only to 16 kilobytes, so you get Segmentation Fault.
In my example I use 16384k notation and in /etc/project we can see 16777216.
Now we can log as george and check our configuration:
Code:
root@testserver # su - george
george@testserver # id -p
uid=102(george) gid=1(other) projid=101(user.george)
george@testserver # prctl -n process.max-stack-size $$
process: 21059: -sh
NAME    PRIVILEGE       VALUE    FLAG   ACTION                    RECIPIENT
process.max-stack-size
        basic                16,0MB      -   deny                             21059
        system          8,00EB    max   deny                                  -

I'm not sure but I think that you don't need to set up pfcsh. It is shell used when we setup RBAC but RBAC is not used in this case.
This User Gave Thanks to GP81 For This Post:
 

8 More Discussions You Might Find Interesting

1. Programming

How to increase the size of the stack

Hi!!, could someone tell me how to increase the stack size in HP-UX? Thanx (7 Replies)
Discussion started by: jyotipg
7 Replies

2. UNIX for Dummies Questions & Answers

soft rebooting

When I do a hard reboot, the system recognizes both the ttya and the ttyb, but when I do a hard reboot, it only doesn't recognize the ttyb. Is there a way I can fix this??? Thanks!:confused: (5 Replies)
Discussion started by: nattie_h
5 Replies

3. AIX

chfs increase /var limit at 512mb?

Is there a limit of 512Mb when doing a "chfs -a size=XXXXX /myfs" ? I managed to increase /var to 512MB fine, no issues, then i wanted to increase /usr to 2Gb, but when i enter: # chfs -a size=2260992 /usr chfs: 0506-908 Cannot reduce size... (5 Replies)
Discussion started by: craigp84
5 Replies

4. Programming

what is stack winding and stack unwinding

helo can u tell me what do you mean by stack winding and stack unwinding Regards, Amit (2 Replies)
Discussion started by: amitpansuria
2 Replies

5. UNIX for Dummies Questions & Answers

Kernel Stack vs User Mode Stack

Hi, I am new to the linux kernel development area. I want to know what is the difference between kernel mode stack and user mode stack? Does each process has a user mode stack and a kernel mode stack?? Or Each process has a user mode stack and there is only one kernel mode stack that is shared by... (4 Replies)
Discussion started by: saurabhkoar
4 Replies

6. Solaris

Limit: stacksize: Can't remove limit

Hi all, I'm using to Solaris machine. When I run a simple script this messenger come out:"limit: stacksize: Can't remove limit". Any one know the way to resolve this problem without reboot the machine? Thanks in advance. (3 Replies)
Discussion started by: Diabolist9
3 Replies

7. Solaris

8 character limit for ipcs command , any way to increase # of chars ?

Hello All, We have a working script which identifies and kills ipcs resources which havent been correctly killed during normal shutdowns. It is working fine and dandy however there are some issues now. Environment: SunOS 5.10 Generic_148888-03 sun4u sparc SUNW,SPARC-Enterprise ... (4 Replies)
Discussion started by: icalderus
4 Replies

8. Red Hat

Cannot set 'soft limits' for 'maximum stack size' for a standard user

Hi Guys, I'm trying to install Oracle Database on to Oracle Linux 7.6 but when the database install package checks the OS set-up, it keeps on failing on the soft limits for the stack. It's default value is 8192 but I'm trying to set it to 10240. This is what I added to... (2 Replies)
Discussion started by: ASGR
2 Replies
All times are GMT -4. The time now is 11:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy