PDA

View Full Version : Problem with init 3 command



tomer-l1
31st January 2007, 09:25 AM
Hey,

recently i've encounterd a weird problem. While i'm logged on in my account, i can't kill X with the init 3 command, i've tried switching to the terminal with Ctrl+Alt+F1 and then enter init 3 , but it's the same thing, bash doesn't recognize the command.
However, as root i can order my system to go into init 3 and init 5.
tryied already to import the /etc path, but nothing had changed.

any help with this will be very appriciated :)

markkuk
31st January 2007, 09:41 AM
You must be root to change runlevels. There isn't any problem, your system works as it should.

tomer-l1
31st January 2007, 10:02 AM
You must be root to change runlevels. There isn't any problem, your system works as it should.

I'm not so sure about it, because I used to do it in my account, and as far as I remember,
but for example when I try to run yum via my account, not as root and without adding "sudo, su -c" I'm getting errors telling me about restricted commands and so on..but not telling me about invalid command.

Gualicho
31st January 2007, 05:22 PM
Try su -c '/sbin/init 3' ... You must be root to change runlevels...

tomer-l1
31st January 2007, 07:14 PM
Try su -c '/sbin/init 3' ... You must be root to change runlevels...

but what if root can't change levels too?
in the terminal, as root i gave the init 5 command and received:
bash:init: command not found

Gualicho
31st January 2007, 07:25 PM
Did you try "/sbin/init 5" or just "init 5"? Check to see that init is in the /sbin dir, or maybe /usr/sbin/

nick.stumpos
31st January 2007, 07:42 PM
if you became root using just su, then you kept your users path which does not include /sbin, if you either login as root or su -, then you get roots path which includes the /sbin/ directory, thus you can use init without typing the /sbin