How to stop a reboot after init 6 is given by mistake?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users How to stop a reboot after init 6 is given by mistake?
# 8  
Old 05-22-2014
You lost your bet, achenle Smilie
Code:
# dd if=/dev/zero of=/proc/1/as
dd: /proc/1/as: open: Permission denied
# uname -a
SunOS sol10 5.10 Generic_141445-09 i86pc i386 i86pc

# 9  
Old 05-22-2014
I agree completely with Corona688 (post#4). You can't mess with the init process!!!!

The init process is part of the kernel (PID=1) and all you are doing with 'init 6' is sending a signal to that process to change run level.

Direct use of the init command gets a faster response than the shutdown command and is often used by sysadmins. However, you need root privs to get the command acted on by the system and, if you are logged in as root (or su'd to root), you need to be thinking about what you're doing VERY CAREFULLY. Root bypasses all normal security on most Unix flavors, you are god and anything you say goes, no questions asked. There are all sorts of commands that root can accidentally type that will completely destroy the system outright.

If I login on my own account then I know that if I try something stupid that the system will tell me. If I login as root then I really pay attention to what I'm doing (and logout from root as soon as possible).

Last edited by hicksd8; 05-22-2014 at 10:09 AM..
This User Gave Thanks to hicksd8 For This Post:
# 10  
Old 05-22-2014
Quote:
Originally Posted by nanz143
Hi, I recently had an issue and by mistake a script of mine has initiated init 6 command,

Is there a way to stop the reboot manually after init 6 is given
Taking the question literally, this is actually very easy to do. Wait until the system has shut down and then power it off. That will stop the reboot. Smilie

I'm not just being a wiseguy. I have done exactly this several times in the past several years. I meant to type "init 5" and accidentally typed "init 6". These were servers on my desk and I was re-installing (an upgraded version of) the OS. So I had easy access to the power button.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

init-script failing because of /etc/rc.d/init.d/functions

I encountered a problem on one of our database servers. OS: CentOS 5.5 final Kernel: 2.6.18-238.5.1.el5.028stab085.2 (OpenVZ kernel) We wrote some DB-Start/Stop-scripts ("/db2/admin/scripts_dba/start_services.ksh" and ".../stop_services.ksh") to start the database instances. (Database... (1 Reply)
Discussion started by: bakunin
1 Replies

2. Solaris

What is the diffe b/w init s and init S

i did my research in finding the answer but couldn't find right one. Please give your inputs. (6 Replies)
Discussion started by: ranumala
6 Replies

3. UNIX for Advanced & Expert Users

Problem on init 0, execution is the same with init 6

Hi, I am experiencing a weird thing on my SUNFIRE machine with Solaris 9 OS. When I do init 0 to shutdown the machine to go to ok prompt, what it did was shutdown and reboot like an init 6 command do. I did check the corresponding rc scripts that were involved with init 0 and compared with rc... (2 Replies)
Discussion started by: Yenthanh
2 Replies

4. Shell Programming and Scripting

How to stop monitoring of servers at the time of reboot through shell scripting?

We have number of servers which belongs to platforms Solaris, AIX,HP-UX and LINUX. Monitoring tool 'Patrol Agent' process run on the servers to check for the server health and communicate with the Patrol server through the port 5181. During scheduled reboot and maintenance of servers we do receive... (1 Reply)
Discussion started by: subharai
1 Replies

5. Red Hat

Difference between 'init s' and 'init 1'

What is the difference between 'init s' and 'init 1'. I know that both will work to change the current run level to single user mode. Is there any difference in those two commands? (5 Replies)
Discussion started by: praveen_b744
5 Replies

6. Linux

How to I change init levels after typing init 1

Dear all, I typed in init 1 on my redhat box as root and according to wikipedia (http://en.wikipedia.org/wiki/Runlevel): 1 Single-User Mode Does not configure network interfaces, start daemons, or allow non-root logins So now I can't connect back to it. How do I change the init back to 3?... (8 Replies)
Discussion started by: z1dane
8 Replies

7. Solaris

diff between reboot and init 6 in solaris

Hi All, Does anyone tell me , is there any difference between solaris "reboot " and init 6 ...bcos in case of reboot for a system ..can i use init 6 for that instead. Thanks in advance, J (6 Replies)
Discussion started by: jegaraman
6 Replies

8. UNIX for Advanced & Expert Users

how to stop others users to stop viewing what i am doing ?

Hi , I have one question, suppose i am a normal user and when i use 'w' command , it shows who is logged on and what they are doing . Now i want to stop others users to know what i am doing accept the root ? can i do this ? thanks (5 Replies)
Discussion started by: mobile01
5 Replies

9. Solaris

different between soft reboot and hard reboot

Hi Guru's Can any want here could explain to me the different between soft reboot and hard reboot . Best Regards Seelan (3 Replies)
Discussion started by: seelan3
3 Replies

10. UNIX for Advanced & Expert Users

Init 6 & Init 0 problem

Hi Expert, I have encountered some problem with my SUN system. Everytime when i issue command #init 6 OR #init 0 it just logout and prompt for login again instead of rebooting the server when run init 6 and system shutdown when run init 0.. I can only reboot the system using reboot ... Was... (6 Replies)
Discussion started by: sc2005
6 Replies
Login or Register to Ask a Question