Hi this is my first thread. I use KDE and Gnome on Debian. I configured inittab like what it should be. But when i have an inittab file i can't see anything when i run who -r command.
? Yes, your posted output of this command looks strange.
Please post the output of:
What does that say.
I would also add that runlevel 5 in some distributions tells init to shutdown (in an orderly manner) AND power off (if the hardware supports power off).
Runlevel 0 will shutdown and halt the system leaving power on.
I don't have inittab file and it is the standard configuration on Debian. So what do you think ? It seems normal when i became root.
i created inittab file and wrote id:5:initdefault: in it. Then i rebooted my computer. But at first couldn't run X Server , sometimes it happens on my distro. Then i rebooted system again. I saw the login screen. And this is the result
I think there are some bugs in my system but why this feature needs to be root to be executabled or runned. Maybe it is in / root directory that's why.
Thanks for your help. Have a good day.
Moderator's Comments:
Please use CODE tags correctly as required by forum rules!
Last edited by RudiC; 11-14-2016 at 06:14 PM..
Reason: Changed ICODE tags.
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.
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.
Thanks for your support. I understand what you mean. I told that bug to my team leader and we'll try to fix it. Now it is working but i can modify the inittab file.
I couldn't understand that part
For KDE or GNOME i think that it should be 5
"Runlevels 2-5 are multi-user (some distro uses RUN level 5 to start X [KDE/Gnome])"
Have a great day.
Edit :
Your init system is Systemd, not SysVinit. /etc/inittab is a configuration file of SysVinit, it is not used by Systemd. I presume you have this file because this is a jessie system which was upgraded from an earlier jessie or from wheezy with SysVinit.
Systemd doesn't exactly have a concept of runlevels, though it approximates them for compatibility with SysVinit. Systemd has “target units” instead. You can choose the boot-time target unit by setting the symbolic link /etc/systemd/system/default.target. See the Systemd FAQ for more information.
If you don't want to use Systemd, install the sysvinit-core package, which provides a traditional SysVinit (formerly in the sysvinit package, which in jessie is now a front for systemd). As of jessie, Debian defaults to Systemd but still supports SysVinit.
Moderator's Comments:
Please use CODE tags as required by forum rules!
Last edited by RudiC; 11-16-2016 at 07:33 AM..
Reason: Changed ICODE to CODE tags.
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)
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)
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)
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)
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)
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)
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,
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)