Find the answer to your Linux question:
Results 1 to 5 of 5
CentOS 5.5 After I login as root, it displays the MOTD and shuts down. During the bootup process it says that Runlevel is set to 0. I checked through init ...
  1. #1
    Just Joined!
    Join Date
    Jan 2011
    Posts
    87

    System shuts down after login.

    CentOS 5.5

    After I login as root, it displays the MOTD and shuts down. During the bootup process it says that Runlevel is set to 0. I checked through init and inittab, the runlevel was still 3. I didn't think this would be it because I'm already logging in, but I figured I'd try. I went through rc.sysinit, rc.local, shadow and profile and I cannot find a reason for it.

    What could be causing this?

  2. #2
    Linux Newbie
    Join Date
    Apr 2010
    Location
    Novosibirsk, Russia
    Posts
    136
    Try to explore kernel logs of your system (booting from live cd). You should get '/var/log/dmesg' and '/var/log/messages'. And if you suppose that something switch your runlevel after login, try to look into '~/.bashrc' file - this file is executed by Bash after user login.

  3. #3
    Just Joined!
    Join Date
    Jan 2011
    Posts
    8

    Passwd File

    if possible try to check the /etc/passwd file . In the passwd file go to root entry and check the bin path of root. Accidentally it may have shutdown path /sbin/shutdown instead of login path as /sbin/login.

  4. #4
    Just Joined!
    Join Date
    Jan 2011
    Posts
    87
    someone put 'shutdown -h now' in .bash_profile of the root user, of which only a handful of users have access to.

    Thanks for the help!

  5. #5
    Linux Newbie
    Join Date
    Apr 2010
    Location
    Novosibirsk, Russia
    Posts
    136
    You're welcome

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...