Strange efect su user;/etc/rc.d/rc.0

Strange efect su user;/etc/rc.d/rc.0

Post by Piotr Klaba » Sun, 13 Apr 1997 04:00:00



Hello,
  I reconfigure now my linux. And I have some problems.
  I have slackware distribution. During boot I always
  see root directory is mounted read-only, after that rc.K
  script is executed (TERM and KILL signals are sent),
  then rc.M is executed and everything is OK.
  /etc/inittab seems to be OK.

  Today I changed /etc/inittab, and then I got into
  /etc/failinit program (that is executed in case init have
  some problems).

  I have:
* /bin/bash statically linked.
* root has shell /bin/bash
* user has shell /bin/tcsh
  I run:
* login as root
* cd /etc/rc.d
* su user
* rc.0          (see the below)
After that I can toogle between root and user,
one time execute command as a user, second time as a root.

server:~#
server:~# cd /etc/rc.d
server:/etc/rc.d# su user
server:/etc/rc.d:1 14:03:07% rc.0
Running shutdown script rc.0:

[1]+  Stopped (signal)        su user
server:/etc/rc.d# halt: must be superuser.
cp: cannot create regular file `/etc/localtime': Permission denied
Turning off swap.
umount: only root can do that
swapoff: /dev/swap: Operation not permitted
Unmounting local file systems.
umount: only root can do that
mount: only root can do that
The system is halted.
On the next boot fsck will be FORCED.
halt: must be superuser.
server:/etc/rc.d:2 14:03:10%
server:/etc/rc.d:2 14:03:12%

[1]+  Stopped (signal)        su user
server:/etc/rc.d#
(...)
server:/etc/rc.d# pstree
init-+-bash---screen---screen---bash-+-less
     |                               |-pstree
     |                               `-tcsh    <- each command I toggle into this process
     |-crond                                      (as user user)
     |-gpm
     |-kflushd
     |-klogd
     |-kswapd
     |-rpc.portmap
     |-syslogd
     `-xinetd

--
Piotr Klaban
---

 
 
 

Strange efect su user;/etc/rc.d/rc.0

Post by roo » Mon, 14 Apr 1997 04:00:00


Howdy-

I've got a question for one of you bright Linux type folks- I've got a generic
486DX-100 with 24Mb RAM & gobs of HDisk running RedHat 4.0 linux. The system
has been recompiled to match my specifications here- but the problem I'm about
to describe was also present before the changes- Seems to me it might have also
been this way in Slackware before that- but I don't recall exactly so I can't
say exactly- in any case... I'm running the standard default XFree386 that
comes with Red Hat.

I have noticed that when my system first reboots and I start up X-Windows it
comes charging out of the gate like a thoroughbred - but after a day or two of
being up and just doing the usual stuff- reading mail, the occasional telnet
or FTP, netscaping a little- etc- the system becomes really sluggish. Not
un-usably so, but definately noticeably slower.

When the system first reboots, I can type a line of text and hit the backspace
key and it gets back to the left before I can even see it happen! After a few
days, it happens at a nice (actually more usable really) pace. The same thing
happens with window scrolls or refreshes. When it first starts up they blaze
by- After a day or so it just sort of plods along.

Ok, so its a mystery- I've thought about the possibility of free memory getting
used up- and indeed, when I do a free command, the amount of available memory
keeps shrinking while the amount of cache keeps increasing. It never seems to
"free" up- in my experiences with other Unix's that's a pretty typical thing.
I guess the system grabs the memory and uses it for cacheing or something- I
dunno..

I don't know the answer to whether it happens without Xwindows since I use X
all the time. Also the system is very stable otherwise. I think it would run
happily for weeks, months- maybe even years without rebooting. Me on the other
hand, I have to reboot a little more frequently :) Seriously though, its gone
several weeks no problems between boots so I don't think it ever "runs down"
in terms of speed. It just sorta grinds down to "cruising speed" and then
stays there until rebooted.

ANY SUGGESTIONS?


News connection is sometimes a little flaky-

Thanks in advance

John Whitten

--
+----------------------------------------------------------------------+

  Internet Consulting, Unix Administration, Programming, etc. Mail me!  

 
 
 

Strange efect su user;/etc/rc.d/rc.0

Post by Andrew Cos » Mon, 14 Apr 1997 04:00:00



>I have noticed that when my system first reboots and I start up X-Windows it
>comes charging out of the gate like a thoroughbred - but after a day or two of
>being up and just doing the usual stuff- reading mail, the occasional telnet
>or FTP, netscaping a little- etc- the system becomes really sluggish. Not
>un-usably so, but definately noticeably slower.

[snip]

Quote:>Ok, so its a mystery- I've thought about the possibility of free memory getting
>used up- and indeed, when I do a free command, the amount of available memory
>keeps shrinking while the amount of cache keeps increasing. It never seems to
>"free" up- in my experiences with other Unix's that's a pretty typical thing.
>I guess the system grabs the memory and uses it for cacheing or something- I
>dunno..

Umm.  The system just grabs whatever it needs back from the cache.  Your
available memory is actually "free" + "cache".  So, that's not the problem.

Quote:>I don't know the answer to whether it happens without Xwindows since I use X
>all the time. Also the system is very stable otherwise. I think it would run
>happily for weeks, months- maybe even years without rebooting. Me on the other
>hand, I have to reboot a little more frequently :) Seriously though, its gone
>several weeks no problems between boots so I don't think it ever "runs down"
>in terms of speed. It just sorta grinds down to "cruising speed" and then
>stays there until rebooted.

Have you an AMI bios/chipset?  Mine kicks the processor speed down on
ctrl-alt-+, the same combination used to up the resolution in X.

Other than that, I couldn't say.

 
 
 

1. which user does /etc/rc.d/rc.local / rc.sysinit run as?

Im running Enigma and want to set up a systemwide fetchmail daemon ... I
have got the /root/.fetchmailrc file set up fine and need to know where
to put the 'fetchmail' command.

Should I put fetchmail somewhere in either /etc/rc.d/rc.local or
rc.sysinit?  Whereabouts should I put it in?  Are there security risks
here I should know about?

--
Cheers,
Glen

2. Trident TGUI 9440 with XFree

3. difference between /etc/rc.sysinit and /etc/rc.d/rc.sysinit ?

4. File Systems strangely becoming read-only

5. /etc/rc: sendmail parms don't match /etc/rc.conf

6. Redirecting ports to another server

7. /etc/rc.d/rc.sysinit: /etc/sysconfig/keyboard: No such file or directory

8. Newbie - Linux (slackware) wont boot

9. SOLVED - Raid rc.0, rc.6 rc.S

10. Trouble with /etc/rc.d/rc.sysinit root mount

11. RH7.3: LVM & /etc/rc.d/rc.sysinit

12. call to ldconfig in /etc/rc.d/rc.sysinit question

13. /etc/rc.d/rc.sysinit: /proc/sys/kernel/sysrq: No such file or directory