Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:UNIX Philosophy (Score 2) 555

I'm a web programmer who loves Linux,

Welcome.

but the kernal and start-up are still black magic to me.

SysV init is really quite simple. Just a few minutes playing around with it on a system and you'll get the hang of it. First off, there are several run-levels. Let's focus on just one run-level for now since most people only ever edit one (they'll use run-level 0: shutdown, and run-level 6: reboot, unknowingly). Within each runlevel directory (let's choose /etc/rc5.d/) are symlinks that point to the scripts in /etc/init.d/, and these symlinks are named with S for start or K for kill, followed by a number for the order they should be executed in, followed by the script name (for readability's sake; it doesn't need anything beyond the S/K##). When starting or ending a run-level (booting/shutting-down), init goes through the simlinks in order and runs the init scripts they point to with either "start" or "stop" as parameters. The scripts handle the peculiarities of the various daemons, and act as an easily configurable startup mechanism that allows the sysadmin to fine-tune things. For example, if a server's system clock fails, ntpd will refuse to update because the clock-skew is too great ("2014!? But it's currently 2002 according to the system clock."). So, a sysadmin can write a little hack for ntpdate at the beginning of the "start" function in ntpd's init script. Mind you, this is a poor example, but easier to explain than any I could come up with quickly.

Maybe an init system can be simple. I don't understand why even shell scripts are needed. Seems like they should be the exception, not the rule.

Editing init scripts is the exception, but because it happens enough times, the scripts should exist as a rule. Scripts allow for high-configurability while keeping some level of separation. The things ntpd does on startup could be parameters, and even the above ntpdate functionality (which is considered bad form in the ntp world: trusting the network time too greatly) could be compiled into the ntp daemon. But who wants to include every hack every sysadmin comes up with for their own environments in the main codebase for ntpd? And who amongst all the sysadmins wants to recompile ntpd for every change and essentially maintain their own fork? Not to mention the differences between distributions for configuration file locations, log files, etc. It's much easier to use scripts as that happy medium where sysadmins can edit without need for constant recompiles.

Why not one big super-script then...

Seems like configuration should be a single file that lists the programs to start from top to bottom

...this violates the separation principle. And would be slightly annoying too. It's easier to handle the individual scripts for their respective daemons than it is to isolate the section that is needed, and as pointed out before, a mere list of executable paths isn't enough, even with parameters; not configurable enough. Let's say you make a change on server 1's init script for ntpd. Now you want to copy that configuration to all 10,000 servers you have. Easy-peasy for a specialized init-script (assuming they're all the same distro and version): just copy the file to every machine and restart ntpd. But with a monolithic script, if you copy it to every machine, you'll be copying entries for daemons that the other servers might not have, or worse: removing entries for vital daemons on the target servers. Keeping them separate is best. Just as keeping them highly configurable is best.

Comment Re:It's time to start a trade war. (Score 1) 106

My gradnfather fought in a real war. From what he told me, it was nothing like this.

Some great uncles of mine were on the beach at Normandy. One of them got a blueprint copied directly from his entire left leg. He survived, but only because a quick thinking medic was able to replace it with a pin-up from the landing craft. He still gets compliments on that leg.

Comment Re:It only takes one ... (Score 1) 381

"Unlikely contagious" is an acceptable risk for a lesser disease, one that doesn't usually kill its host. But she and the CDC should have recognized that even a slight risk of spreading this thing is unacceptable. She should have quarantined herself.

Comment Re: It only takes one ... (Score 2) 381

Even worse: she's a nurse. She felt there was a chance she might have Ebola, so much that she called the CDC. She didn't err on caution. Forget the CDC's (non)answer. She knew what she was doing was risky. Even if no one gets infected, she had better talk to a lawyer about all the "mental anguish" lawsuits she'll soon be subjected to.

Comment Re:Negative (Score 1) 549

The first thing I learned about storing passwords is that you use a salted hash, which is impossible to decrypt back into plaintext. Am I missing something, or is this practice not standard practically everywhere now?

Apparently you are missing something because while common practice, it's not ubiquitous. And like all common practices, it gets spoken of less and less until new developers reinvent the wheel and decide they want passwords in plain text to make password recovery 'easier' ("click on the http link in your email and you'll see your password!")

Comment Re:Oh great (Score 1) 549

Passphrases don't help the root problem, that "memorable" implies low-entropy.

Except that the human brain can separate out words as atomics rather than the parts that make up their whole. This makes remembering a string of a small number of truly random words easy to remember.
Demiurgic precompel Pediculicidal superimpersonally trichromate Voq
increep Sporodochium impassioning Winesburg Spicknel bacon-and-eggs
Are those really so impossible to remember? The biggest problem is when someone starts using sporodochium in casual conversation a lot, you know it's part of their new random passphrase or they started a word-of-the-day calendar.

Slashdot Top Deals

Today is a good day for information-gathering. Read someone else's mail file.

Working...