LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-01-2006, 02:39 PM   #1
nedimyra
LQ Newbie
 
Registered: Feb 2006
Location: Norway
Distribution: CRUX & Slackware
Posts: 6

Rep: Reputation: 0
Unable to change user: *su root*


Hi.
I have recently installed PLOS, and have been toying around with it for some days.

But yesterday I unfortunately ran into a when Im trying to use the *su* command, and here is how it goes:

If I open a terminal or console and try to acess root privileges by using the *su* command my system is going wild.
The CPU raise from its ususal 5% to 100%, and the tasks rise from ca 100 up to several 1000!
This constant opening of new tasks is eating up my RAM (1GB). And when no ram is left, it start to fill up my swap (1,6GB) as well, until there is no memory left, real or virtual..
While this frenzy is going on I find myself unable to stop the process(-es?), not even being able to log out. In the end the system freeze, leaving my with no other options than to use the reset button.
I have tried to find out what is broken, if there is a conflict or mal-configuration.
Googling the net gave no help, and I have been looking at LinuxQuestions for some hints as well.

While Im trying to locate the problem, I found this:
If I open a new virtual Console terminal using Ctrl+Alt+F1, Im able to log on as root.
If I first log on a virtual terminal as user, and then try to log on as root using the su command, all hell break loose..
If I open PCLinuxOS Control Center (PCC) and then go to /system/console the CPU is firing up to 100%, but Im able to stop the prosess by choosing File/exit or closing the window.

I logged in to a desktop as root instead of user, and tried the different terminals and consoles.
Here is what I found:
When I open one of xterm, aterm, terminal & Xfcf-terminal I encontered problems, but the KDE-konsole(superuser-mode), YaKuake & the PCC/system/console worked fine. On the other hand, if I did "su user" and then "su root" it gave me problems. But I could stop the evil process by closing the console/terminal window.

I have also sucessfully stopped the wild process by restarting the X-server by using Ctrl+Alt+Backsp, both as user and as root. Restarting X was possible as long as I used the option early, before the process had frozen my system by eating up all memory.

So, since Im able to use su, as long as it used as root, to change to an "downgraded" user, my intuitive rasoning brings me to the conlusion that the su command may not be the problem. On the other hand its actually after I have typed my password, and striked enter, the hell break loose. So it may have something to do with su in relation to some kind of authentication-process or initiating-prosess?
Being able to stop the uncontrolled process by restarting the X-server indicate that the X-server is involved.
I have tried to look at the different system-logs, but as a relative newbee, I must admit that I dont know exactly what Im looking for, and where..


I also have made some snapshots of the system using the "top" command:

Before I tried "su root", I got this::

top - 12:03:44 up 9:39, 4 users, load average: 0.06, 0.24, 1.08
Tasks: 99 total, 2 running, 97 sleeping, 0 stopped, 0 zombie
Cpu(s): 4.3% user, 0.7% system, 0.0% nice, 95.0% idle, 0.0% IO-wait
Mem: 1035496k total, 386932k used, 648564k free, 18396k buffers
Swap: 1622484k total, 2664k used, 1619820k free, 216908k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
548 root 20 0 170m 21m 4048 S 3.3 2.2 2:01.92 X
9508 root 20 0 28192 16m 13m R 0.3 1.6 0:01.10 konsole
1 root 20 0 1548 500 448 S 0.0 0.0 0:00.90 init
2 root 39 19 0 0 0 S 0.0 0.0 0:00.23 ksoftirqd/0
3 root 15 -5 0 0 0 S 0.0 0.0 0:00.76 events/0
4 root 15 -5 0 0 0 S 0.0 0.0 0:00.01 khelper
5 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 kthread
7 root 15 -5 0 0 0 S 0.0 0.0 0:00.24 kblockd/0
38 root 20 0 0 0 0 S 0.0 0.0 0:02.48 kapmd
55 root 20 0 0 0 0 S 0.0 0.0 0:00.00 pdflush
56 root 20 0 0 0 0 S 0.0 0.0 0:00.17 pdflush
58 root 15 -5 0 0 0 S 0.0 0.0 0:00.00 aio/0
57 root 20 0 0 0 0 S 0.0 0.0 0:00.84 kswapd0
136 root 21 0 0 0 0 S 0.0 0.0 0:00.00 kseriod



Trying "su root" the system change to this after ca 4.min.:

top - 12:07:21 up 9:50, 5 users, load average: 3.08, 1.93, 1.43
Tasks: 3991 total, 9 running, 3982 sleeping, 0 stopped, 0 zombie
Cpu(s): 52.5% user, 46.6% system, 0.0% nice, 0.0% idle, 0.9% IO-wait
Mem: 1035496k total, 1027144k used, 8352k free, 3464k buffers
Swap: 1622484k total, 5936k used, 1616548k free, 96360k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
8667 root 20 0 4360 3300 776 R 6.5 0.3 0:24.34 top
13099 root 20 0 4000 3068 776 R 6.2 0.3 0:04.70 top
57 root 21 0 0 0 0 R 3.4 0.0 0:01.25 kswapd0
548 root 20 0 171m 22m 4240 S 1.9 2.3 2:17.53 X
24430 root 20 0 1708 600 436 S 0.9 0.1 0:00.03 ksh
56 root 20 0 0 0 0 S 0.3 0.0 0:00.18 pdflush
24075 root 35 0 1712 604 436 S 0.3 0.1 0:00.01 ksh
24097 root 35 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
24119 root 35 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
24165 root 35 0 1712 600 436 S 0.3 0.1 0:00.01 ksh
24187 root 36 0 1712 604 436 S 0.3 0.1 0:00.01 ksh
24253 root 36 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
24496 root 20 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
24540 root 20 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
24586 root 20 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
24785 root 20 0 1712 600 436 S 0.3 0.1 0:00.01 ksh
24895 root 21 0 1712 604 436 S 0.3 0.1 0:00.01 ksh
25095 root 21 0 1712 604 436 S 0.3 0.1 0:00.01 ksh
25139 root 21 0 1712 604 436 S 0.3 0.1 0:00.01 ksh
25161 root 21 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
25184 root 21 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
25316 root 22 0 1712 604 436 S 0.3 0.1 0:00.01 ksh
25450 root 22 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
25560 root 22 0 1708 600 436 S 0.3 0.1 0:00.01 ksh
25627 root 22 0 1712 600 436 S 0.3 0.1 0:00.01 ksh
1 root 20 0 1548 500 448 S 0.0 0.0 0:00.90 init
2 root 39 19 0 0 0 R 0.0 0.0 0:00.23 ksoftirqd/0
3 root 15 -5 0 0 0 S 0.0 0.0 0:00.80 events/0

As you may see, this "ksh" is a loose horse..
Sometimes ksh is filling the whole screen, from top to bottom, and I suspect this endless proliferation is eating my RAM..
I suspect ksh is the Korn shell, pdksh.
When I check pdksh for removal in Synaptic, I see the Xorg11 packages is dependent on pdksh.

So, this is where I am. Something is broken in my system, and Im not able to pinpoint it, and correct it.
I have provided all the information I have been able to gather, and hopefully someone can tell me what is wrong, and how to correct it.

E_A
 
Old 03-02-2006, 07:28 AM   #2
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
interesting.

what happens if you try "su -" rather than "su" or "su root".

it seems like the shell is your problem here........
 
Old 03-02-2006, 03:45 PM   #3
nedimyra
LQ Newbie
 
Registered: Feb 2006
Location: Norway
Distribution: CRUX & Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
Thanks, su - works :-)
It was frightening experience to loose control like that.
Was already considering a reinstall..
 
Old 03-02-2006, 03:47 PM   #4
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
well it might work, but it doesnt answer why that happened.

if you use the "-" it loads that user's profile. if you don't it doesn't log them in the same...
 
Old 03-03-2006, 06:08 AM   #5
seelenbild28
Member
 
Registered: Oct 2005
Location: Germany, Berlin
Distribution: SuSE Linux 9.1/9.2/9.3/10.0/10.1, openSuSE 10.2, 10.3, Slackware, Debian, Redhat, BSD
Posts: 315

Rep: Reputation: 30
could it be something related to memory? did you run a "memtest" on your memory chips?

also, I am wondering about 1.6 GB swap. If you have 1 gig ram you even wouldn't need any swap...
 
Old 03-03-2006, 08:51 AM   #6
nedimyra
LQ Newbie
 
Registered: Feb 2006
Location: Norway
Distribution: CRUX & Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
Hi, I haven't run a memtest, but Im currently reading about it.

And I also agree that 1.6 GB swap is overkill on Linux.
It's probably a bad habit I have left over from the days in M$-world,
where they usually set the page.sys file to 1.5xRAM..
I'll never do it again, Im still learning.. ;-)
 
Old 03-03-2006, 08:56 AM   #7
Michael_aust
Member
 
Registered: Aug 2005
Location: Lancashire (United Kingdom)
Distribution: Debian Etch, on 686 machine.
Posts: 509

Rep: Reputation: 31
i thoguth the most you ere supposed to give for swap was 1gb nly under certain circumstances and that most people could get away with 500-700 mb
 
Old 03-03-2006, 09:13 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
"too much" swap won't cause a malfunction---the machine just won't use it.

Did you try a GUI login as root?

If you cure this by simply re-installing, you would not be the first.....Things get glitched--power surges, cosmic rays, etc. One of the many reasons that I argue that coumputers are not deterministic.
 
Old 03-03-2006, 12:27 PM   #9
nedimyra
LQ Newbie
 
Registered: Feb 2006
Location: Norway
Distribution: CRUX & Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
Well, I have encountered some other problems too. Hardware that was working perfectly after install, dosen't seem to work anymore. So I've decided to do a clean install. It had been nice to solve this problem, if not for anything else than to gain some new knowlegde of my favorite OS.
I will reduce my swap to 2x350MB on my new system ;-)

By the way, I tried to logg on as root, and it gave me inconsistent results:
If I tried to open xterm, aterm, terminal & Xfce-terminal I encontered problems.
YaKuake & KDE-konsole(superuser-mode) gave me no problems, but if I did "su user", and then "su" or "su root" I encountered problems with these 2 terminals to, but "su -" gave me no problems.

Anyway, thanks for all your help.

Have a nice weekend..
Skål :-)
 
Old 03-03-2006, 12:38 PM   #10
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
At age 10, I developed a reputation for fixing lawnmowers by disassembling, cleaning, and re-assembling. If I was successful, I never knew WHY.

Now--much older--I re-live this behavior with computers.

On Windows, you learn to re-boot to fix any number of glitches and to do a clean install AT LEAST once per year. In spite of claims of robustness, Linux may also sometimes benefit from this unscientific approach.
 
Old 03-03-2006, 12:43 PM   #11
satinet
Senior Member
 
Registered: Feb 2004
Location: England
Distribution: Slackware 14.2
Posts: 1,491

Rep: Reputation: 50
there is some truth in that, but if you really look after your system then there's no need to. i've run the same slackware system for a few years and it still works great.

but we all get tempted to do a "apt-get dist-upgrade" or a <fill in your package mangager>.

and we don't trim the log files and manage our accounts....

it's a human thing - lazyness? busyness i think....
 
Old 09-10-2006, 11:14 AM   #12
nedimyra
LQ Newbie
 
Registered: Feb 2006
Location: Norway
Distribution: CRUX & Slackware
Posts: 6

Original Poster
Rep: Reputation: 0
xprint + su = crash..

Hi
Yes, I know this thread is old, but I got the same problem today.
I had some printing problems, and therefore installed the xprint-rpm form one of the pclos repositories.
Shortly after, when trying to log in as root (su + passw) in Konsole, my mashine chrashed as described in message above.
When substituted *xprint*-rpm with *xorg-x11-Xpt*-rpm my problem disappeared.

So, the *1.0-0.008_20030508.2mdk* version of xprint is somehow causing a problem or conflict when installed.

This may be a distro-specific problem, anyway,
do anybody have any idea where to report this problem?

N
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Root user unable to rm, mv or chmod Zoar Linux - Newbie 3 10-10-2019 03:12 PM
Help! Cannot Add a User to User Manager or Change Root Password lennysokol Linux - General 2 06-25-2005 09:59 AM
unable to change root shell sandin Slackware 3 04-17-2005 08:33 AM
unable to startx as non-root user raska Slackware 7 11-22-2004 06:41 PM
Unable to logon on as non-root user after update as unable to set executable context pls198 Fedora 2 04-09-2004 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration