The bug in your system is that you don't have a /etc/inittab file. As far as I'm aware this file is always created at installation and the most you might do is edit it. Creating one from scratch is laborious and needs in-depth knowledge of exactly how you want the system to behave.
A typical Debian (Squeeze) inittab file looks like this:
I suggest you try injecting the above into your inittab at least down to the comment line "# Normally not reached" even if you don't copy the rest. That might restore some resemblance of normality.
Obviously, this whole mechanism is surrounded by security. You couldn't allow an ordinary user to use 'init' to change run levels; only root can do that. Also, why would an ordinary user want to know the runlevel of the system? If they are allowed to read inittab they certainly wouldn't be allowed to write to it. So there may be a simple explanation why 'who -r' doesn't work properly for a non-root user.
Hi,
Is there a limit to the number of symbolic links you can have?
I tried to vi the symbolic link relating to a file and got the following error:
"filename" Too many levels of symbolic links
There is only one symbolic link to one file in this case, but there are >2000 other links to... (2 Replies)
I have a problem, i dont know if its a normal behaviour or not, i can go to a lower init level, but i cant go to a higher one again, for instance i can run the command init 2 while im at init 3 and when i do who -r i find myself go down to 2 but if i type init 3 and wait im still finding myself in... (1 Reply)
Hi,
Could somebody throw some light on the below queries:
- For a run-level X, the S* scripts are executed when coming here from X-n run-level. The K* scripts are executed when coming to X runlevel from X+n runlevel.
- Does reaching to runlevel X from X-3 executes K* scritps from X-2 & X-1... (4 Replies)
Hi guys,
I know I'm missing something simple here.
We have about 500 zipped files in a directory which contain more zip files and within those I need to find a file without unzipping everything.
I know I can use zipinfo which I'm trying to create a for loop to go through the files and... (4 Replies)
Hello,
I have a simple question because I can not find the information at oracle.com
I want to buy support for OS Solaris and Servers hardware.
I need information what are the levels of support and how much they cost?
I need a help.
Have a nice day (3 Replies)
Hello,
I'm running rhel6 64bit. Accidentally I ran % chmod -R 777 /etc and after that I have a problem to do 'su' or 'sudo'. When I did sudo it complained that /etc/sudoers has 777 while it should be 0440. I changed that and also restored right permission for:
-rw-r--r-- 1 root root 1966 May 19... (2 Replies)
Hi All,
Currently our application is running on the server having AIX 5.3 OS.
What we intend to do is to run a shell script owned by another user and needs to be run as that particular user.
I was trying to create a shell script using the su command before running the actual script (which... (4 Replies)
Hi Guys,
I need to change the following script ( which is good for Linux) for Solris 11
#start oracle
start on runlevel
stop on runlevel
What it should be for Solrais 11.
Thanks for your help.
Regards
Terry (2 Replies)
Discussion started by: terrykhatri531
2 Replies
LEARN ABOUT OSF1
inittab
inittab(4) Kernel Interfaces Manual inittab(4)NAME
inittab - Controls the initialization process
SYNOPSIS
/etc/inittab
DESCRIPTION
The inittab file provides the init program with instructions for creating and running initialization processes. The init program reads the
inittab file each time init is invoked. The file typically contains instructions for the default initialization, the creation and control
of processes at each run level, and the getty command, which controls the activation of terminal lines.
Each line in the inittab file contains an entry that has four fields; each field is separated by a colon. There is no limit to the number
of entries in the inittab file. The entry syntax is as follows: Identifier:Runlevel:Action:Command
Specifies a fourteen character field used to uniquely identify an object. Specifies a twenty character field that defines the run levels
in which the object is to be processed. Runlevel corresponds to a configuration of processes in a system. Each process spawned by the init
command is assigned one or more run levels in which it is allowed to exist. The run levels are as follows: Specifies the halt state.
Specifies multiuser state without network services. Specifies multiuser state with network services. Specifies single-user state. You
can define multiple run levels for a process by specifying more than one run level character in any combination. Specifies a twenty char-
acter field that tells init how to treat the specified process. init recognizes the following Action values: Specifies that if the process
does not exist or if it dies, init starts it. If the process exists, init continues to process the inittab file. Specifies that if init
enters a run level that matches the run level specified in the inittab file entry, it starts the process and waits for its termination. As
long as init continues in this run level, it does not act on subsequent reads of the entry in the inittab file. Specifies that if init
enters a run level that matches the run level specified in the inittab file, it starts the process and does not wait for its termination.
When the process stops, init does not restart it. If init enters a new run level where the process is still running from a previous run-
level change, init does not restart the process. Specifies that when init first executes and reads the inittab file, it processes this
entry. The init program starts the process and does not wait for its termination. When the process stops, init does not restart it. The
run level specified in this inittab file entry should be the default run level, or it must match the run level in which init operates at
boot time. Specifies that when init first executes and reads the inittab file, it processes this inittab file entry. The init program
starts the process, waits for its termination and, when it dies, does not restart the process. (This value exists only for SVID3/SVR4 com-
patibility.) Specifies that if init receives the SIGPWR power fail signal, it executes the process associated with this line. (This value
exists only for SVID3/SVR4 compatibility.) Specifies that if init receives the SIGPWR power fail signal, it executes the process associ-
ated with this line and waits until the process terminates before continuing processing the inittab file. Specifies that if the process
associated with this line is currently running, init sends the warning signal SIGTERM and waits 20 seconds before sending the kill signal
SIGKILL. If the process does not existent, init ignores the inittab entry. Specifies that a line with this action is processed when init
is originally invoked. The init program uses this line to determine the run level to enter originally. It determines this by taking the
highest run level specified in the run level field and using that as its initial state. If the run level field is empty, this is inter-
preted as 0s23, causing init to enter run level 3. If init does not find an initdefault entry in the inittab file, it requests an initial
run level from the operator. Specifies that entries of this type are executed before init tries to access the console. This inittab file
entry should be used only to initialize devices on which init could attempt to request a run level. Specifies a 1024 character field that
contains the sh command to be executed. The command is prefixed with exec. Any legitimate sh syntax can appear in the command field. Com-
ments can be inserted be specifying a number sign (#). The line continuation character can be placed at the end of a line.
EXAMPLES
The following is an example of an inittab file entry for a terminal line: tty01:23:respawn:/usr/sbin/getty /dev/tty08 9600 vt100
FILES
Specifies the command that initializes and controls terminal lines.
RELATED INFORMATION
Commands: init(8), getty(8)
Functions: kill(2) delim off
inittab(4)