Sponsored Content
Operating Systems Linux Debian Disabling emergency and init mode Post 302815525 by rink on Saturday 1st of June 2013 05:28:29 AM
Old 06-01-2013
Disabling emergency and init mode

Hello all friends

I recently disable runlevel 1

i want to know , is there any way to disable emergency mode and init mode

init mode means if any user pass kernel parameter at grub i.e init=/bin/bash
then bash shell appears

I want to disable it for security purpose

System = Debian 6

Any help
Thanks
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

7. UNIX for Advanced & Expert Users

What is the difference between single line mode and multiline mode in Regular expressions?

Hi All, Can please let me know what is the difference between the single line mode and multi line mode in regular expresions? Thanks, Chidhambaram B (3 Replies)
Discussion started by: chidhu.anu
3 Replies

8. UNIX for Dummies Questions & Answers

How to change the background color in the init 3 mode(not line color)

Hello, I am using RHEL 6.1 on VMware I am searching for a way to change background color (not line by line color wich one can using tput command) basically changing the color of the whole screen to white instead of the default black and changing font color to black and alos would like to... (2 Replies)
Discussion started by: Dexobox
2 Replies

9. Fedora

Bash in Emergency Mode

I'm sure this is a really dumb question, but if I use a command in Fedora 23 emergency mode, and that command doesn't exist, I don't come back to the command prompt, but enter what appears to be a text mode. How do I get back to the command line? (2 Replies)
Discussion started by: bangorme
2 Replies

10. UNIX for Advanced & Expert Users

Disabling CBC Cipher mode causes login problems

Hi, As part of the security hardening activity in our team, we have to disable CBC mode cipher encryption, and enable CTR or GCM cipher mode encryption. To do this, in sshd_config I comment out these lines : Ciphers aes128-cbc,blowfish-cbc,3des-cbc MACS hmac-sha1,hmac-md5 and add... (9 Replies)
Discussion started by: anaigini45
9 Replies
runlevel(7)						 Miscellaneous Information Manual					       runlevel(7)

NAME
runlevel - event signalling change of system runlevel SYNOPSIS
runlevel RUNLEVEL=RUNLEVEL PREVLEVEL=PREVLEVEL [ENV]... DESCRIPTION
This page describes the runlevel Upstart event, and the general implementation of runlevels in the Upstart system. For the runlevel tool, see runlevel(8) The runlevel event The runlevel event signals a change of system runlevel. The new system runlevel is given in the RUNLEVEL argument, and the previous system runlevel in the PREVLEVEL argument (which may be empty). Additional environment may follow these depending on the runlevel, and the tool that emitted the event. The shutdown(8) tool will supply an INIT_HALT variable set to either HALT or POWEROFF when called with -H or -P respectively. Runlevels Runlevels are a concept from UNIX(R) System V used by the init(8) daemon or other system initialisation system to define modes of system operation. Eight runlevels are permitted, the first seven are numbered 0-6 and the eighth is named S or s (both are permitted). Services and other system components are said to exist in one or more runlevels. When switching from one runlevel to another, the services that should not exist in the new runlevel are stopped and the services that only exist in the new runlevel are started. This is performed by the /etc/init.d/rc script executed on a change of runlevel (by jobs run on the runlevel event in the Upstart system). This script examines symlinks in the /etc/rc?.d directories, symlinks beginning K are services to be stopped and symlinks beginning S are services to be started. The authorative documentation for this process can be found in the System run levels and init.d scripts section of the Debian Policy Man- ual. This may be currently found at <http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit> Runlevels 0, 1 and 6 are reserved. Runlevel 0 is used to halt the system and 6 to reboot the system. Runlevel 1 is used to bring the sys- tem back down into single-user mode, after which the runlevel will be S. System V initialisation in Upstart The compatible implementation of runlevels permits Upstart jobs to be run on the runlevel event that perform the same functionality as the original System V init(8) daemon. The /etc/init/rc.conf job is run on the runlevel event, thus receiving the RUNLEVEL and PREVLEVEL environment variables. Its sole job is to execute the /etc/init.d/rc script, passing the new runlevel as an argument. Initial system startup is provided by the /etc/init/rc-sysinit.conf job. This is run on the startup(7) event, and is primarily responsible for running the /etc/init.d/rc script with the special S argument and calling telinit(8) to switch into the default runlevel when done. This also handles the -b, emergency, -s and single kernel command-line options as well as specifying an alternate runlevel on the kernel command-line. Finally the /etc/init/rcS.conf job handles the special case of entering the single-user runlevel and providing a login shell. Once that shell terminates, this restarts the rc-sysinit job to re-enter the default runlevel. Implementation of runlevels in Upstart The Upstart init(8) daemon has no native concepts of runlevel, and unlike the System V daemon, makes no attempt to keep track of the cur- rent runlevel. Instead a compatible implementation is provided by the runlevel(8), telinit(8) and shutdown(8) tools supplied with Upstart. The telinit(8) and shutdown(8) tools are used by system administrators to change the runlevel, thus they both generate this runlevel event obtaining the value for the PREVLEVEL environment variable from their own environment (the RUNLEVEL variable) or the /var/run/utmp file. Additionally they update the /var/run/utmp file with the new runlevel, and append a log entry to the /var/log/wtmp file. The runlevel(8) tool may be used by system administrators to obtain the current runlevel, this reads the RUNLEVEL and PREVLEVEL variables from its own environment or reads the current and previous runlevel from /var/run/utmp. The who(1) -r command may also be used to read the current runlevel from /var/run/utmp. This provides full compatibility with System V. During the boot scripts, where the /var/run/utmp file may not yet be writable, the RUNLEVEL and PREVLEVEL environment variables will be available so telinit(8) will still provide the correct values. Once the boot scripts have finished, while the environment variables may no longer be available, the /var/run/utmp file will be and the most recent telinit(8) invocation should have successfully written to it. Boot time records The telinit(8) tool also takes care of writing the boot time record to both /var/run/utmp and /var/log/wtmp. This is written if the previous runlevel in these files does not match the previous runlevel obtained from its environment. In general this occurs when switching from runlevel S to the default runlevel, at which point the /var/run/utmp and /var/log/wtmp files are both writable, and the telinit(8) invocation to do the switch has RUNLEVEL=S in its environment. EXAMPLE
A service running in the typical multi-user runlevels might use: start on runlevel [2345] stop on runlevel [!2345] SEE ALSO
runlevel(8) init(8) telinit(8) shutdown(8) who(1) Upstart 2009-07-09 runlevel(7)
All times are GMT -4. The time now is 03:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy