ulimit setting problem on Solaris

How do you make the ulimit values permanent for a user?

by default, the root login has the following ulimits:

# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 1024
memory(kbytes) unlimited

I set the nofiles to a larger value:

# ulimit -n 2048
# ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 2048
memory(kbytes) unlimited

The problem is that after i log off, and log back, I get the default values again:

root@walton:> ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 8192
coredump(blocks) unlimited
nofiles(descriptors) 1024
memory(kbytes) unlimited

I've uncommented the /etc/default/login as:

ULIMIT=0

Here's the current value in the /etc/system file:

set rlim_fd_cur=2048

I even did the following:

ulimit -Hn 2048 followed by
ulimit -n 2048

It's only good until I log off.

I keep getting the default value everytime I get on.

Can someone help please.

You could add the command to either the account's .profile or to the system's /etc/profile (and /etc/.login for csh - note the command is unlimit descriptors for csh).

The problem i found is that there's a missing line in the /etc/system..

Had to add the line:
set rlim_fd_max=4096

Without this condition, the default value for nofiles is half of the rlim_fd_cur.