“Many Windows users are familiar with different modes of execution of their operating system: safe mode, command prompt only, safe mode with network support and other such options that are presented during the boot-up process. Similarly, Linux has different modes of executing as well, which are known as runlevels. But unlike Windows, we can change runlevels on a fly. Runlevels control services started by the initialization process. The number of runlevels and services started on those runlevels varies with Linux distributions. Information about the runlevels of a particular distribution is listed in file /etc/inittab.”
>> we can change runlevels on a fly
Oh yeah man, that’s mighty cool!
“cool”? Not really. But it can be handy – I used singleuser a few months ago to clone over my install to a new drive.
But the article linked-to wasn’t about trying to say anything was “cool”. It was just a basic listing of modes. It failed to explain what these modes could be used for, so wasn’t very good at all.
Also, different systems can use different values – Slack comes to mind.
Anyway, putting all fun aside, I think it’s a nice overview of runlevels on Linux. Kudos to the author for this
(hope I’m not getting beat to death now, just because I thought the typo was funny)
More like dis-information without some mention of System V, almost seems like redhat invented it. No mention of init/shutdown/reboot etc. or how you would even use that knowledge.
Runlevels control services started by the initialization process
is not a sentence or was it meant as a section title?
This article is good intro, but lacks details. It isnt cool but coolest among uncools.
osweekly is improving. I want to give full kudos to its editor in chief(though he hasnt written anything yet) and editor.
Windows has different Crash Levels.
Since when do home / consumer users care about run levels? They dont.
when debugging a driver level crash, single user mode in windows is very very handy. Just because most people don’t know something exists doesn’t make it less important to those that do.
Also, any home/consumer user of linux should care about run levels as they are a necessary piece of knowledge.
I am a home user of OS X, Linux and Windows, and I sure as hell care. Don’t overgeneralize.
You are a techie user not a home user Big difference, home users do not post on OS forums
Windows also has much better security permissions for files and devices unlike Linux’s User/Group/Other which is not fine grained enough.
I take it you’re unfamiliar with Linux ACLs, which provide the same kind of granularity in file control as in Windows.
2001 called, they want their FUD back. Oh, and please stay on topic.
Did you checked this ? Do you know this ?
You can do this with Linux also.
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/fs-acl.ht…
This is just an “Unlike Windows” article… wtf?
Are you trying to raise your score or something like that by posting several times what could be consolidated in one single post? 🙂
I post in sepereate posts because EDIT does not work for me on OSNews on FireFox 1.5.0.2, dont you think I would have edited them if I could? I dont give a google for scores on forums.
Then take your time before posting. Use preview. Lots of short posts from you give the impression that you’re spamming the boards.
Why does everyone keep complaining about User/Group/Other? If it’s not fine-grained for you, then don’t use it! Use ACLs instead. Why keep bringing this up?
The BSD approach is much simpler: you have single-user mode and multi-user mode.
Single-user mode is just the kernel + a shell, from which you can do administrative tasks (fsck, backup/restore, …), and start additional services (networking, …) individually using the rc.d system.
Multi-user mode is started when quitting the single-user mode shell, or just booting up normally. In multi-user mode, all services enabled in /etc/rc.conf are started. If you want to restart XDM for example, you don’t need to switch runlevels, you just do a /etc/rc.d/xdm restart. If you want to disable networking, you do /etc/rc.d/network stop.
Halting and rebooting is done with the shutdown(8) command: “shutdown -h now” (or -p for halt+poweroff) and “shutdown -r now”, which properly stop all running services.
If you want to restart XDM for example, you don’t need to switch runlevels, you just do a /etc/rc.d/xdm restart. If you want to disable networking, you do /etc/rc.d/network stop
Like with most init implementations …
Anyway, this article is so dumbed down it’s wrong at times, even though the author seems to know what he’s talking about.
He should have stated he was talking about a SysV or BSD type of init. Because runlevels are not specific to Linux at all, they depend on the “init” process used.
Some init do not even use true runlevels.
It’s not true either that su is always called in single user mode. In some setups (like LDAP based, PAM based with some network access), doing this will make your OS unbootable. Sulogin is often used, as you’re sure to get the prompt. I think the author made a mistake, as I don’t think su will give you the promp without password (unless PAMed to do this), and I don’t think su can be used as a login program either. So I think he meant sulogin.
His security problem is bogus too. If you can change the boot sequence at the lilo level, you can as well launch a shell instead of init, and thus get root access as easily.
Everything else he says is dependant on init too (where files are put, format of inittab, …).
There is no one common method in Linux – redhat’s runlevel scripts are different from gentoo’s, suse’s, ubuntu and slackware.
Tell me where to add a new service?
chkconfig or startsvc or edit /etc/init.d or /etc/rc.3 or boot.local or modules.conf?
I would like to know how Debian Linux runlevels operate. I changed Debian’s current runlevel to 5, so I would get a CLI login instead of X but nothing changed.
Well, first hit on google was excellent:
http://lists.debian.org/debian-devel/2003/01/msg01898.html
thanks! I meant from current runlevel of 2 to 3 to get login without X. is there is way to disable GDM?
The ‘correct’ way is to use update-rc.d to stop gdm running in (for example) runlevel 3.
It’s easier to install sysv-rc-conf (Debian package name) and use that to manage the symlinks instead. Running sysv-rc-conf as root gives you a nice grid of checkboxes showing which services will be started / stopped in each runlevel — just uncheck gdm in runlevel 3.
sysv-rc-conf can also be used in the style of chkconfig on Red Hat, so something like this is also possible:
# sysv-rc-conf –level 3 gdm off
Section 2.4 of the Debian Reference[1] contains a good overview. Section 9.3 of the Debian Policy Manual[2] is good reading if you are really interested in what goes on under /etc/init.d
[1] http://www.debian.org/doc/manuals/reference/ch-system.en.html#s-boo…
[2] http://www.debian.org/doc/debian-policy/ch-opersys#s-sysvinit
and with single user u can reset the root password, there is some tricks and stuff you can do to midigate this but still.
id like to see this go away.
-Nex6
and with single user u can reset the root password, there is some tricks and stuff you can do to midigate this but still.
id like to see this go away.
Also, if you have root access, you can change the password, too, and do lots of other bad things…
What’s your point? The only ways to get into single-user mode are to be root, or to have physical access to the computer. In either case, you have enough power already – so single-user mode is not exactly a security hole.
“and with single user u can reset the root password, there is some tricks and stuff you can do to midigate this but still.”
There’s no need to mitigate this, it’s the intended behaviour.
If you havent secured the physical access to the machine you have bigger problems than that the root password can be changed.