-   Linux - Newbie (
-   -   How do I log on as root without using 'su' when I'm in gnome GUI? (

rgm6000 03-01-2011 08:43 AM

How do I log on as root without using 'su' when I'm in gnome GUI?
Using RHEL 5 the admin user is logged on and Gnome is open. I need to make a change to the /etc/security/limits.conf file using root but if I su to root the change does not stick. I've been told to log on as root without using 'su' but cannot find out how to do this?

snowpine 03-01-2011 09:06 AM

Please explain exactly what you mean by "the change does not stick."

I would recommend:


su -
nano /etc/security/limits.conf

(You can substitute vi etc. for nano if you prefer.)

It is theoretically possible to log in to Gnome as root, but it is not designed to be easy as it is very poor security practice.

rgm6000 03-01-2011 12:11 PM

re '..not stick', after su - to root entered 'ulimit -c unlimited' then entered 'ulimit -a' and the change was displayed. Then went back to user account and entered 'ulimit -a' and the change was not shown.

Kyle Lionheart 03-01-2011 01:58 PM

You may have answered yourself in the first post here. :)


Originally Posted by rgm6000 (Post 4275187)
[...] I need to make a change to the /etc/security/limits.conf file using root [...]

I'd guess that ulimit as root changes the limits for root, so if you want to apply the change to a different user you'll have to manually edit limits.conf(and you can only do that as root). snowpine's instructions look fine to me ;)

rgm6000 03-01-2011 02:46 PM

OK thanks.
Using ssh from my pc, I went to limit.conf as root and entered * soft core unlimited
logged off and logged on as root, entered 'ulimit -a' and got core file size (blocks,-c) unlimited, changed to another user and got core file size (blocks,-c) 0. What am I missing?

chrism01 03-01-2011 07:51 PM

Let me explain it this way; you can interactively change those values FOR THE CURRENT SESSION by issuing those cmds at the cmd line.
To make them 'stick' you actually have to manually edit the file with vi /vim (substitute your editor of choice).
This is pretty much std for any cmd in Linux.


Kyle Lionheart 03-02-2011 06:31 AM

you changed the soft limit. What is the hard limit for *(and/or your specific user)? Soft limits cannot go above hard ones.

rgm6000 03-02-2011 07:08 AM

A little background, I am making these changes on our production internet server. The reason I've been trying to make the change is to get more debug data because we have intermittent crashes on the application server on this system. I'm working with the application vendor and they recommended the change.

I've been using vi for all my edits. This server has only 1 user with logon privileges at present there are 3 settings in limits.conf:
* soft core unlimited
user1 soft nofile 20000
user1 hard nofile 49152
(Logged on as root the core file size shows 'unlimited', as user1 '0'.)

Since soft limits cannot go above hard, what additional setting do you think is needed?
My vendor only specified changing 'soft'

jschiwal 03-02-2011 08:12 AM

A softlimit can be changed by a normal user up to the hard limit. The kernel enforces the soft limit. So you don't need to change the hard limit. The hard limit prevents a normal user from increasing a limit above a certain amount.

Kyle Lionheart 03-03-2011 04:30 AM

is there anything in /etc/security/limits.d/ that may override what you set in limits.conf? That's the only other thing I can think of right now.

rgm6000 03-04-2011 09:58 AM

We do not seem to have a 'limits.d' file. I'm on this project part time so cannot get back to it until next week, at that time I'm planning to open a support case with Red Hat and I will post the outcome. Thanks to all for your assistance.

rgm6000 03-25-2011 09:11 AM

Red Hat solution:

Please run the following command as the non root user.# unlimit -c unlimited

Thanks to all for your support.

All times are GMT -5. The time now is 12:50 PM.