Why is SSH password authentication a security risk?

Question: Most guides for OpenSSH configuration advise to disable password authentication in favor of key-based authentication. But in my opinion password authentication has a significant advantage: an ability to connect from absolutely anywhere without a key. If used always with a strong password, this should not be a security risk. Or should it?
Comment: Passwords are one-factor authentication which can be sniffed, guessed and replayed. Keys are (possibly) two-factor. Being able to log in from anywhere with just one factor is unacceptable on some systems.
Answer: Using ssh keys do have one unique feature compared to password login: you can specify the allowed commands. This can be done by modifying ~/.ssh/authorized_keys file at the server.
For example,
command="/usr/local/bin/your_backup_script.sh", ssh-rsa auiosfSAFfAFDFJL1234214DFAfDFa...

would allow only the command `/usr/local/bin/your_backup_script.sh" with that particular key.
You can also specify the allowed hosts for the key:
from="yourclient,yourotherclient", ssh-rsa auiosfSAFfAFDFJL1234214DFAfDFa...

Or combine the two:
from="yourbackupserver", command="/usr/local/bin/your_backup_script.sh", ssh-rsa auiosfSAFfAFDFJL1234214DFAfDFa...

With keys you can also grant temporary access to some user (say, a consultant) to a server without revealing the password for that particular account. After the consultant has finished his/her job, the temporary key can be removed.
Comment: Further to that using Keys is like having a long 2000 character password (well technically its even more strength) as compared to what you can key in manually in a terminal :D
Comment: Two very useful tips about SSH authentication, but really doesn't answer the question for me...
Comment: If you want to force a password-authenticated user to go through a specific command, change his login shell. Also, "granting temporary access without revealing the password" is a very bad idea. There are hundreds of different ways to keep the access for later.
Comment: Very very useful tip.
Comment: The last paragraph alone answers the question IMO - keys allow for granular revocation, while with passwords you need to inform everybody that you're changing it.
Answer: You can get the best of both worlds by only allowing password authentication from within your network. Add the following to the end of your sshd_config:
PasswordAuthentication no
Match Address 10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
    PasswordAuthentication yes

Answer: There are pro's and con's for either pw or key-based authentication.
In some cases, for example, key-based authentication is less secure than password authentication. In other cases, its pw-based that's less secure. In some cases, one is more convenient, in others, less.
It all boils down to this: When you do key-based authentication, you must secure your key with a passphrase. Unless you have ssh-agent running (ssh-agent frees you from entering your passphrase every time), you've gained nothing in terms of convenience. Security is disputable: the attack vector now shifted from the server to YOU, or your account, or your personal machine, (...) - those may or may not be  easier to break.
Think outside of the box when deciding this. Whether you gain or loose in terms of security depends on the rest of your environment and other measures.
edit: Oh, just saw that you're talking about a home server. I was in the same situation, "password" or "USB stick with key on it" always with me? I went for the former but changed the SSH listening port to something different than 22. That stops all those lame script kiddies brute forcing whole network ranges.
Comment: Changing SSH port from 22 might not be a good idea at all in many cases.  https://www.adayinthelifeof.nl/2012/03/12/why-putting-ssh-on-another-port-than-22-is-bad-idea/
Answer: When you log in with a password you transmit your password to the server. This means that the operator of the server can modify the SSHD to get access to your password. With public key authentication, they cannot obtain your private key as only your public key every goes to the server.
Comment: This is especially relevant when you connect to the wrong server because of a typo. For instance, at some point in time, .cg was a wildcard pointing to a single machine with ssh enabled. Anytime you would mistype .cg for .ch, you would end up connecting to that box and leaking your password...
Comment: @b0fh indeed. As far as I can tell, this is the only real vulnerability introduced by using passwords with ssh. If someone already owns the server you're connecting to, or can spoof the IP addresses you're connecting to (MITM), you've already lost.
Answer: ssh keys prevent man in the middle based attacks on your password.
when you attempt to login with a key the server will construct a challenge based on your public key and send it to your client.
which will decrypt it and construct an appropriate response to send.
Your private key never gets sent to the server and anyone listening in is unable to do anything except intercept that single session.
with a password they would have your credentials.
My solution is to have a portable ssh key in suitable formats on an encrypted partition on a usb key. this allows me to:
easily retract that key in the event of it being lost.
restrict which servers it allows me access to
and still carry it around
though installing the mount software is a pain (truecrypt)
Comment: And to the answerer: You needn't use truecrypt, openssh private keys come with their own optional password-based encryption.
Comment: Thomas, in reality many people ignore the warning about a fingerprint change. Pubkey auth guarantees MITM protection even if the server's private key somehow gets compromised or a human types "yes" absentmindedly: The attacker has to choose between not being able to see the traffic and sending a public key that will not log in, which is a win.
Comment: This is wrong. As soon as you know the server's public key (which you do if you added it to your cache and did not get MITM'd on the first connection) you are immune to MITM attacks. Key/password-based authentication has nothing to do with it. The password is *never* sent in clear over the wire, a secure connection at machine-level authentication (what's your/my public key) is always set up before user-level authentication (what's your password/prove to me this public key is yours).
Answer: You have partially responded to your question - the more places attacker can connect from, the more possibilities he has to break into your server by bruteforcing (consider DDoS).
Also compare the length of your password with the key size (usually thousands of bits).
Comment: @NickDownton - You can have a nice long password without resorting to keypass software. Something like `mywifesnameisangelaandshehasanicebutt` is invunlerable to dictionary attacks, is very strong, and very simple to remember, but impossible to guess. And it comes with the bonus if brownie points if you ever need to give your password to your wife.
Comment: Sorry, Mark, but that's wrong.  The passphrase you give has 37 characters and therefore roughly 44 bits of entropy, which is weaker than 7 random printable characters, and eminently attackable.  Read Wikipedia's article on the work of Claude Shannon for details, but the upshot is that written English is highly predictable - eg, after "mywifesname", the word "is" is nearly guaranteed.  For strong passwords involving words, four **random** words strung together from a dictionary will give you some 10**23 possibilities, which is about 77 bits of entropy; still not great, but not bad.
Comment: @SachinDivekar that's 96 bits of entropy only if using random passwords from the set [a-zA-Z], not if it is English words.
Comment: 96-bits of entropy means an 80-character password, if it's written English; 15 characters if it's random gibberish from the printable character set.  are you quite sure that your ssh passwords are that long/strong?
Comment: If you have multiple passwords with 96-bits of entropy which aren't going to be vulnerable to Dictionary attacks, you are probably going to need to use some sort of password management software anyway, so you effectively lose the accessible everywhere element of using passwords.
Comment: @MadHatter, 96-bits of entropy means an 17-character password, if it's written English i.e. [a-zA-Z]. [reference](http://en.wikipedia.org/wiki/Password_strength#Password_strength_depends_on_symbol_set_and_length).
Comment: @MadHatter sorry I couldn't get the context of **if it's written in English**.
Comment: Not to worry, I could have been clearer!  Three cheers to eldering for sorting it all out!
Comment: I wouldn't say he's `wrong` ... a brute force attack would match up the 7 random character password way before it would ever get his passphrase. Maybe you could compromise and do MwniAashanb.
Comment: But with a, say, 96-bit entropy password the bruteforcing time would still be astronomical, even with thousands of computers.
Answer: It is a trade-off, as @MartinVejmelka says.
The reason you use key based auth is that the key is so far above current or near future brute forcing that you need to be either coming from your own PC, or have the key on a USB stick or similar.
A password has the following issues:

If it is short it can be brute forced
If it is long it is easily forgotten
It could be shoulder surfed

A key is orders of magnitude longer, and is not displayed at any point so it avoids these three issues.
Comment: at which point the lost key can be removed, and a new key added.  With passwords (especially shared passwords) this can me a MAJOR pain, and involves a lot of groaning.
Comment: @finnw Correct Horse Battery Staple :-) http://security.stackexchange.com/q/6095/485
Comment: but using a key file adds the issue of losing the pen drive, or whatever storage you're using.
Comment: One of my (recently-retired) passwords: `08Forging2?seminal*^Rajas-(Posed/|`. It's randomly-generated but I have no trouble remembering it.  And good luck shoulder-surfing or brute-forcing it.
Answer: Good points mentioned here already.
What I consider the biggest risk, given you have taken care of the basics with a strong password, is that a lot of computers have keyloggers installed without the user realizing it. There are even people creating entire sites of useful utilities that contains trojans, so it can happen to the best of us. A keylogger would for example email the login details to a hacker which then easily could access the server.
I recently was warned by Norton about downloading Zombee Mod installer (not the jar, the installer) for adding flight to the Minecraft jar. I looked at the details and Norton listed a lot of utilities on this site that was marked as containing a trojan. I don't know if this is correct or not, but it was pretty specific with filenames. It is also a known fact that trojans are put into (some) warez before they are distributed.
Answer: One potential benefit of SSH over passwords is that if you don't specify an SSH passphrase, then you never have to type in a password again ... your computer is intrinsically trusted on the server because it has the key. That said, I usually always use an SSH passphrase so I rule that benefit out.
I find the best answer for why user guides often recommend SSH over password authentication comes from the Ubuntu manual for SSHOpenSSHKeys. I quote,

If you don't think it's important, try logging all of the malicious login attempts you get for the next week. My computer - a perfectly ordinary desktop PC - had over 4,000 attempts to guess my password and almost 2,500 break-in attempts in the last week alone. How many thousand random guesses do you think it will take before an attacker stumbles across your password?

Essentially if you have a rock solid high-length password with punctuation, upper and lower case, and numbers ... you will probably be OK with password authentication. Also if you plan to monitor your logs, and aren't doing "super secure" stuff across the network anyways ... i.e. using it for a home server. Then by all means, a password works well.
Answer: Passwd auth method is really insecure (imho). With this mechanism the password will be transmitted to the sshd server (like @ramon has already said). This means that some individuals could modify the sshd server to retrieve the password. With a Man-In-The-Middle attack this is very easy to accomplish inside a local network.
You can just patch the sshd server by installing this patch (https://github.com/jtesta/ssh-mitm). Use arpspoof and iptables to put your patched server between the client and the authentic sshd server.
Please disable password auth: open the config file /etc/ssh/ssh_config and add the line PasswordAuthentication no.
Comment: Yeah. The warning appear but beacause 99% of time this is caused by os reinstallation, config changed ecc, most users will ignore the warning and go on.
Comment: Doesn't SSH client check server for RSA fingerprint? After you've sshed to this particular server at least once, it's fingerprint would be remembered, so in the case of possible MITM attacks SSH would light up a warning, wouldn't it?
Comment: @Septagram Many shell account providers aren't in the habit of posting the current server key fingerprint for new subscribers, for migration of user accounts to new servers, etc.
Answer: You can bypass the with the -o StrictHostKeyChecking=no option. This is very useful when using ssh in a shell script.
ssh -o StrictHostKeyChecking=no -o ConnectTimeout=10 -o PasswordAuthentication=no -o ConnectionAttempts=5 xxUser@xxxHost


Given Newton's Third Law, how can an inanimate object create a force?

Question: Newton's Third Law states that

Whenever any force is exerted by a body#1 on any other body#2, another force which is equal in magnitude and opposite in direction is exerted on body#1 by body#2.

In theory, suppose a boy is pushing a rock heavier than him on ice. Due to the relative lack of friction, the boy would probably be pushed back more than the rock was pushed forward. How is this possible? How can an inanimate object create a force?
Comment: Why can't an inanimate object create force? When you move your hand across a surface, don't you experience friction?
Answer:
How can an inanimate object create a force?

If you were to trip on a banana peel and slam your face into the ground, it would hurt a lot.
Brought to you by the Earth: the inanimate object that just can't let it go.
Answer: When you walk, you push the ground back with your foot right?
Then how are you moving forward if the force is backwards?

Newton's third law says that If you exert a force on the ground backwards, the ground exerts a force on you forward, of equal magnitude(friction). This force pushes you forward.

There you have another example of an inanimate object exerting a force, without which you could not have existed.
Edit: To summarize all the answers, what we are trying to do is basically convince you that Even inanimate objects can exert a force. The difference between a living object and an inanimate object is that living objects can control how they apply a force to some extent, which is probably the only difference between the two.
Answer: In a manner of speaking, Newton's declaration is a bit of "stating the obvious".
Let's try to put it in a different context... if you put your palms together and press, each feels exactly the same magnitude of force, just in opposite directions.
The point of his law is to allow you to do analysis of forces in a given system. Consider a building sitting on some patch of ground. The building exerts some force on the ground because of its mass (weight). The ground must resist that force if the building is to continue to stand in place, so the ground exerts an upward force on the building. The forces are exactly equal and opposite. The point is that you can add up the weights of all the parts of the building, together with everything in it, to come up with some total weight. Knowing that, you immediately know how strong the ground must be to hold it up.
The ability to switch perspective from "weight of building" to "force to support building" is what his third law is really all about.
Answer:
How can an inanimate object create a force?

In this particular instance, you don't actually need to think of the situation in terms of reaction forces.
What you have is leg muscles contacting and by means of a ligament around the outside of a joint extending that joint. Your muscle is providing all the force.
That force acts to extend the length of you body. In space, your body would extend in two directions and your centre of mass would remain at the same position in space. On the ground, you have your feet in contact with the ground and your hands in contact with a rock - so the force is exerted equally on your feet and on your hands (you can feel this in both those parts).
What happens next is a question of which object, rock or ice, provides least resistance. If the rock has a large mass it will not move as easily as your feet do on ice.
This is really a horizontal analogue of what happens vertically when you jump. You don't remain still and propel the planet down away from you because it's more massive. It's the work done by your leg muscles that propels you upwards - the planet didn't provide that energy.


How can I trace an electrical cable?

Question: I'm installing a wall mount over an existing electrical socket - so I want to remove the socket I've read that just capping off the Hot and Neutral wires is not the best approach and that disconnecting from the power source is best. I don't want to disconnect from the breaker panel as many other sockets that I want live are on the same breaker.
How do I find where to disconnect the hot and neutral wires to the socket I want to remove?
Comment: And what do you mean by "wall mount"? Is that a picture, furniture, permanent structure of some kind?
Comment: Photos help.  How many wires into that box?
Comment: Have you verified this is the end of the circuit and not the middle?
Answer: You can rent or buy a circuit tracer, true.
But cheap and easy: turn breakers off one by one until the existing socket goes dead.
Now work backwards, finding the nearest also dead socket.  Yours likely takes off from that point.
Answer: I have and use the Sperry LAN Tracker for this type of thing and it works well. It runs about $40 (WARNING: The power in the line must be off to use devices like this)

Turn off the breaker for the run you'll be working on. If you don't know or don't have the time to figure out the specific breaker then just shut off all the main breakers.
Un-wire the outlet you'll be tracing so you can get to the wires.
Hook the red clip from the LAN Tracker to the "hot" wire. (typically black, but not always) and hook the black clip to the ground wire.
Now you turn on the base unit which sends out a signal into the wire and then you carry around the detector to find the route the wire takes. (you have to press a tiny button the detector for it to detect; its a battery saving feature)

It does work through walls, but just barely. It's much better if you are in the attic and can point at specific wires, but for your purpose its likely to work fine for routing you to the correct spot. You'll sometimes get a false positive because the wire you're tracing runs in parallel with another wire and the signal some how jumps between the lines, but the false positive is always much weaker than the real thing so you get used to spotting them.
That said, if this is not an end-of-run outlet you'll wind up having to run a new line between two devices. So for instance if this outlet is in the middle of two other outlets you'll pull the wire out of the wall to the "left" and "right" of the outlet you want to get rid of and then run a wire from one outlet straight to the other.
Answer: If you don't mind putting a cover plate over the outlet, you can cap the wires and do that. This is by far the easiest solution. Maybe you can find a decorative cover plate online.
If you don't want to put a cover plate over it, then you have to disconnect the socket's wires at its power source, i.e., the outlet/device that is right before it in the circuit. Then you can drywall over (or otherwise hide) the socket's box.
To find its power source:

Identify the breaker for the socket you will remove
Turn if off
Guess which socket or device comes before the socket in the circuit. Usually this is another socket/device on the same circuit that is closer to the breaker box. Then open it and temporarily disconnect and separate the wires.  Make sure no one is going to touch the wires while they are exposed.
Turn the breaker back on and see if the socket works.
If the socket does not work, you found its source.
If the socket still works, repeat 2 – 4 until you find its power source
Once you find its power source, you can turn the power off and disconnect the socket's wires there. But first, do 9 and 10 below. You may want to wait to disconnect the socket's wires until you run the new wire, if necessary.
Turn the breaker back on
Determine if any other socket or light no longer works.
If so, you will need to run a new wire from the power source where you disconnected the socket's wires to the first socket/device that does not work. This will normally be difficult to do and may require hiring an electrician. But, if you can snake the wire yourself, go for it.

How can I trace an electrical cable?


Radio button and Progressive disclosure good practice

Question: i have a form which is to be displayed on selection of a radio button. Will placing this form in between the radio buttons confuse the user? If yes, what would be a good practice to follow?
Answer: It depends on a size of the form and how much you expect is the second (third...) option important.
The safest is to display all radio options first and then the form. You can even style it visually in a way that choosing radio is a "first step" of completion the form.
If you have a really small form (1-4 items, ideally on one or two lines), you can place it between the radios, but you should check with random people, that the second option is still visible enough and understood as alternative option to the first one. This will be affected by default state as well - if you won't have any radio preselected, options might be easier to notice, but switching between them still can be unfriendly in some cases.
If you know that first option will be used a lot and second is rather an exceptional task, you can for example remove the first radio and make its wording a title, display form and above or next to it display sth like "Do you want to rather do XYZ?" and make the other form a different page/workflow.
Answer: So, if I understand it correctly, what you're describing is the following mechanic:

download bmml source – Wireframes created with Balsamiq Mockups
Assuming this there are a couple of things that are important to consider:

Indent the sub form to make clear that it is part of the Radio button in question
Make clear the subform is one thing by graphically styling it clearly in a box, optionally including a titled fieldset.
Show the sub form with a slide down animation to make clear the form fits "in between"
Do not save the subform on it's own, but just consider it an optional part of the larger form. If mentally it can't be considered a part of the larger form a multi step flow would be the better more correct approach.
Answer: In principal I don't think displaying a form using a radio button is a good idea, here are few reasons why:
Progressive disclosure: for progressive disclosure to work there need to be some initial amount of information available to start with. This information will need to provide an overview or a succinct description of what will be disclosed upon user input. This helps users anticipate the type and scope of content being disclosed and be more reactive to the user controls.
Depending on the number of fields required for each form and it's overall complexity, the use of a radio button to display the firm could generate usability problems such as users not being able to predict what the next form will require from them.
Overall, if you are dealing with some kind of selection process, it's better to inform your users upfront and guide them through the process in an efficient and streamlined manner.
Also ensure that this process stays as linear as possible and provide information about each step and what it entails for your users. This transparency will allow them to make better and more informed decisions about any selection they make. Hope that helps
Answer: I have a few reservations about your query. My answer might vary based on the context in which you are using this metaphor and also the kind of user base you have.
Still considering the most generic environment, I would not recommend a form layout between radio buttons. Radio buttons by default denote a group of things which are contextually linked and you can select one option out of the available ones. The user generally expects it to be close together to make the most sense of it.
Since I do not know your exact use case, lets consider you have two vertical radio buttons like,

and when someone makes some selection

This arrangement defeats the purpose of radio buttons.
What you want is a delayed form element creation based on user inputs and radio buttons are not ideally suited for such an operation.
Progressive disclosure

Progressive disclosure is an interaction design technique that sequences information and actions across several screens in order to reduce feelings of being overwhelmed for the user. - Wiki

Considering this definition I guess what you are suggesting does not fall under this one. It is more of a deferred creation mode.
If you provide a little more information about the use case, we might be able to give recommendations.
Answer: I may suggest to use such "segmented control" pattern, it can be appropriate in some cases, especially if you use custom design (web or mobile application, not desktop app with native GUI). It unites radiobutton functionality with tab behaviour:

download bmml source – Wireframes created with Balsamiq Mockups


How do I convert a 4% per annum interest rate, compounded semi-annually, to a monthly rate?

Question: Trying to develop a budget model in Excel. I know a prospective savings account makes 4% per annum, compounded semiannual. I'd like to know how much this means it earns monthly. Does it even earn anything monthly if the compounding is said to be on a semi-annual basis?
Comment: Keep it simple and just divide by 12.  You'll be off by a fraction of a percent (it's really 0.3275% instead 0.3333%, a difference of 58 cents on $10,000).
Comment: Ron I agree with you 100%. Trying to get a high level of precision on something that has higher variability makes little sense.
Answer: For this type of problem, it is often easier to convert from one rate to another through a third standard interest rate.  One good candidate for this intermediate rate is what, here in Canada, is called the effective annual rate. So here goes:
If you earn 4% per year, compounded semi-annually, then you earn 2% over the first half-year.  Then the earned interest is credited, and you earn 2% on this larger amount over the next half-year.
So, you wind up with (1.02)*(1.02), or 1.0404, for each unit invested.  The effective annual rate is 4.04%. If you invested the unit at 4.04% compounded annually, you would wind up with the same amount earned.
Now, how to get back down to monthly compounding.
Suppose your monthly compounded investment grows by a factor of x each month.  Then, after 12 months, you'll have xxxxxxxxxxx*x, or x^12
So you want to find x such that x^12 = 1.0404.
Using the root button on a scientific calculator to take the 12th root of 1.0404, we get x = 1.00330589
So the monthly rate is 0.330589% per month.
Finally, multiplying this monthly rate by 12, we find that 4% per year compounded semi-annually, is the same as 3.967068% per year, compounded monthly...
Comment: Where does the OP use the term APR?
Comment: 4% APR compounded semi-annually is 1.9804% semiannually, not 2% semi-annually.
Comment: @RonJohn The phrase "compounded semi-annually" means it is a nominal rate, so the semi-annual rate is 4%/2 = 2%.  Please see https://en.m.wikipedia.org/wiki/Effective_interest_rate#Calculation , particularly this line : "6% compounded monthly is credited as 6%/12 = 0.005 every month."
Answer: This answer addresses your stated objective, "Trying to develop a budget model in Excel", rather than the headline question about converting between different compounding interest-rate scenarios.
Given a simple interest rate of 4%pa, you will get

no interest in your account for the first 5 months, then
2% in your 6th month,

after which the cycle repeats.
What the 2% is calculated on depends on the terms and conditions related to your account. Unlike term deposits, which lock up the capital for an agreed period, savings accounts usually allow you to deposit and/or withdraw money at any time. The semi-annual interest might be calculated by accruing simple interest of 4%pa on each day's minimum balance. You don't get access to this interest until the end of each 6-month period. If they calculate based on minimum monthly balances or by using average balances, you'll end up with a different figure for the 2% each 6 months.
Assuming a 12-month budget:

include the 2% figure twice a year based on your forecast of the account balance and the terms of your account;
use a zero figure for that account in the remaining 10 months of the year. Interest may be accruing internally but you won't see it in your bank statements for those months.


How to create custom error page in sharepoint 2013

Question: I want to create the custom error page for site.
Comment: if you want to do it without VS, here is a good [link](http://www.nothingbutsharepoint.com/2013/01/22/sharepoint-2013-custom-error-pages-aspx/) explaining how to do it.
Comment: Xavi's link should answer your question. Also here is PowerShell to set your page not found URL:
$spsite = Get-SPSite "Web site URL"
$spsite.filenotfoundurl
$spsite.filenotfoundurl = "/sites/yoursite/Pages/PageNotFoundError.aspx"
Answer: You can choose any of the 3 options from below.
Option 1: Replace the default PageNotFoundError.aspx in the Page Library – One of the easiest and Convenient way to replace default text in PageNotFoundError.aspx is to either edit the PageNotFoundError.aspx that resides in the Page Library or to delete it and replace it with a Custom error Page that has the same i.e. PageNotFoundError page name.
If you choose to do this –
a) You would loose the default Created Page
b) You cannot replace the PageNotFoundError.aspx with a Custom Error Page that you have deployed in 15 hive.
Option 2: Using SPSite.FileNotFoundUrl property – You can use the Out-of-Box SPSite.FileNotFoundUrl property of a Site to Change the URL of default Page Not Found page that is used for the entire site.
You can use the following PowerShell Commands to do this –
$spsite = Get-SPSite "Web App URL"
$spsite.FileNotFoundUrl = "URL of the Custom Error Page"

Option 3: Using SharePoint Designer 2013 (set vti_filenotfoundpage property) – With the new Site Options in SharePoint Designer 2013, you can assign the vti_filenotfoundpage property of the site to a Custom Error Page that you might have deployed in the 15 Hive.
Open your Site in Designer -> Under Manage section -> click on Site Options -> In Parameters(tab) modify vti_filenotfoundpage property to add a relative URL to your Custom error Page deployed in 15 Hive.
Refer below screen shot –

Refer Replace default PageNotFoundError.aspx with Custom Error Page in SharePoint 2013 for more details.
Answer: Xavi's link should answer your question. Also here is PowerShell to set your page not found URL:
$spsite = Get-SPSite "Web site URL"
$spsite.filenotfoundurl
$spsite.filenotfoundurl = "/sites/yoursite/Pages/PageNotFoundError.aspx"


Using Irish Moss in Red Ales?

Question: I have heard about using irish moss in ales as a clarifyer... how do you use it? How much? When? And does it affect the taste of a beer?
I am planning on using it with an Irish Red Ale Extract kit.... any suggestions you would have would be great.
Answer: Irish moss is available at any homebrew supply outlet, often in small bottles with the instructions right on the label.  Use 1 tsp. per 5 gallons of beer at the last 15-20 minutes of the boil. It will not affect the flavor of the beer with such a low dosage, assuming you're not harvesting it yourself.  Its purpose is to latch onto proteins in the beer and pull them out of suspension, thus removing the "haze".  It is best when used in combination with a crash cool, but accomplishes plenty on its own.
Answer: Al Korzonas did some tests years back about using Irish moss.  His findings were that you should use 1/4 tsp. in extract beers and 1 tsp. in all grain beers.  The reason for using less in extract beers is due to the processing of the extract.  For best results, rehydrate the Irish moss in a little water for an hour or so before using it.
Answer: Check out Whirfloc, an alternative to Irish moss.  1/2 - 1 tablet 15 min left in the boil should help your cold break flocculate.
Comment: The manufacturer of Whirlfloc recommends adding it 5 min. from the end of the boil.
Comment: Also, I believe Whirlfloc is just processed Irish Moss. Think of it as pellet hops are to whole hops, Whirlfloc is to Irish Moss.

Using Irish Moss in Red Ales?


Probability distribution of the product of two independent complex gaussian random variables

Question: I have to calculate the pdf of $Z = X*Y$, where $X \in \mathcal{C}(\mu_x,\Sigma_x)$ and $Y \in \mathcal{C}(\mu_y,\Sigma_y)$, where $\mathcal{C}$ is a complex distribution. It can be assumed that $\mu_x$ and $\mu_y$ are real and $\Sigma_x$ and $\Sigma_y$ are equal to $\sigma^2 \left[\begin{matrix}1 & 0\\0 & 1\end{matrix}\right]$, i.e. the real and imaginary part have equal variance and are independently distributed. Also, X and Y are independent.
From the literature (Papers referencing Rohatgi 76) and from the book Rohatgi-2001 I have found that the real-case can be calculated using
$$
p_{XY}(v) = \int_{-\infty}^\infty \frac{1}{|x|}p_X(x)p_Y\left(\frac{v}{x}\right) dx ~~~~~(1)
$$
My guess would be a solution similar to this along the form
$$
p_{XY}(z) = \int_{-\infty}^\infty \int_{-\infty}^\infty\frac{1}{(a+ib)(a-ib)}p_X(a+ib)p_Y\left(\frac{z}{a+ib}\right) da db
$$
but I have not been able to find any sources for this. Also, when I looked in Rohatgi 2001 on p. 141 for the 1D case derivation for hints, it only said that the proof was left as an exercise. This is all well and fine if you know someone to help you.
So... Can anyone give me a link/solution to my problem or perhaps a link to a rigorous derivation of (1) I would be very thankful. I am "simply" looking for a solution in integral form that I can solve so I don't have to use excessive Monte Carlo simulation.
Thank you in advance to all who post.
/Henrik Andresen
Answer: I dont know if this is still relevant, but there is a paper about this problem:

O'Donoughue, N.; Moura, J.M.F., "On the Product of Independent Complex
  Gaussians," in Signal Processing, IEEE Transactions on , vol.60, no.3,
  pp.1050-1063, March 2012

Best,
Rick
Comment: This does not answer the question. You could have provided this useful information as a link once you have enough reputation


Find folders/documents in Google Drive shared outside the organization?

Question: For security reasons we'd like to see all documents in Google Drive which are shared with people outside the organization (Google Apps users). Is this possible? I know you can search for "to:[email]" but this requires knowing the exact email, we want "to:[non apps user]".
Comment: Good question. Too bad it hasn't been answered yet. I've love to know how to view a list of Google Drive items which are shared with the public or shared outside of the Google Apps organization? Can Google Drive users easily search for items which have a sharing setting like "Public on the Web" or "Anyone with the link".
Answer: Google Apps does not natively support reporting on who has access to what in Google Drive. The report you are looking for is possible through a Google Apps script.
As you probably know, from the Reports section of your Google Apps admin panel, you will be able to tell how many files are externally visible.
If you are on the Google Apps Unlimited or Google Apps for Education license, you will have access to a Drive audit log, from which you may be able to generate a report based on sharing events. This could be cumbersome.
If you have a $30 to $40 USD budget, you can either procure the Drive Audit Google Sheet Add-on or the Drive Privacy script from tech blogger Amit Agarwal and produce the report.

A free option based on Stefan Lasiewski's suggestion below is to try whohasaccess.com. The app requires View and manage the files in your Google Drive permissions, among other simpler permissions.
Comment: There is also https://whohasaccess.com/ . The app requires `View and manage the files in your Google Drive` permissions, among other simpler permissions. Also see http://lifehacker.com/whohasaccess-shows-you-who-still-has-permissions-to-you-1617622146


Where can one find the Bitcoin core roadmap?

Question: Is there a site where it shows the current Bitcoin core roadmap on what features will be implemented in the future?
Answer: Refer to https://bitcoincore.org
It contains plans for releases, features (sometimes ) announced on the blog, IRC meeting notes and you can also subscribe to announcements here: https://bitcoincore.org/en/list/announcements/join/. Note that if you want to see which issues and PR's are scheduled for the next release, you can search by milestone. Eg. is:open is:pr milestone:0.17.0
Potentially the most up to date (and accurate) would be the Bitcoin Github Repository. Potential features and bugs can be found on the Issues page as well, and code that is proposed for merging on the Pull Requests page. It will usually also include comments from collaborators that can give an idea of when it might be implemented.


Confusion about how an electron gun works

Question: I'm a little unclear about the charge balance aspect of an electron gun.   Referring to this diagram and similar diagrams I've seen, what I don't get is wouldn't the target of the electrons have to be connected to the positive anode so that the electrons fired at a target can be recycled if the electron gun is needs to operate continuously?  Is the target generally placed on the anode opening so it's connected to the positive?
Answer: This is an Electrical Engineering question. The target is usually not in the hole (opening) of the anode. This is because, first, the hole is small. Second, you often want to be able to manipulate the electron beam, like what people do in the CRT TV. So the target is usually at the right end of your diagram, where your blue arrow points to.
The target is usually connected to the anode so its potential is equal to the anode. You can either connect the anode (and your target) or the cathode to ground. In a microwave oven, the anode of the magnetron (a kind of vacuum tube with anode, cathode) is grounded. In a TV's CRT, the anode is at high positive voltage and other component (maybe the cathode) is grounded.
This diagram might make it clear to you,
Comment: And that is why we say that the whole space between the Anode in the electron gun and the screen is field-free. (All borders are at Anode potential, therefore there can be no Electrical field.) The electrons drift towards the screen at a constant velocity, of approx. 1/3 c ! There they will make a shattering landing, converting all their kinetic energy into light and heat. Some electrons will backscatter and they may make their light in unintended places.
Answer: I cannot comment on the construction of a specific electron gun, but in a typical CRT, the internal surface of the tube around the screen is coated by graphite, forming the final anode electrode.
This electrode is connected to high positive voltage and one of its functions is to collect electrons arriving to the screen.

So you are absolutely right - any cathode ray tube or electron gun should have some return path for the electrons. It is not shown on your diagram, probably, because this diagram is simplified.
Comment: The conductive coating is known by the name "Aquadag". A higher-resistance red version on the inside serves to reduce the magnitude of a flashover current. Similar coating is also needed on the outside, for 2 reasons: to form a capacitor ("Leiden jar" type) for smoothing the anode voltage, and for keeping the outside of the CRT at low voltage and thus preventing "crackle" sounds. The "anti-crackle coating" under the deflection coils is very high impedance, for not dampening the deflection field.
Answer: The cathode source frees up lots of thermal electrons continuously and the electric field between cathode and anode accelerate them toward a specific direction.
and until these two is working electron beam continues to exist with no problem.
Comment: This is correct, the amount of emitted electrons is quite small compared to the amount of free electrons in the metals. What will eventually happen, though, is that an insulated target would become negatively charged and the electron beam would avoid it.
Answer: Think about it this way. The only reason this connection exists in the TV scenario it to hit a target for illumination display purposes. In other applications such as linear accelerators we shoot the beam thru a window into a vacuum waveguide filled with a resonant Microwave freq. This Acceleration scenario creates energies in the Mega Volt scale with target state at ground.  At this highly excited accelerated state crashing into a cooled tungsten target produces Photons at high MV levels  If we make the target Gold we can maintain electron output in the MV (megavolt) levels. This target is ground also and attenuates the electron beam.
Note: Not to be toyed with Fatal energies.


Wifi Problems with Intel Centrino Wireless-N 2230 on Ubuntu 12.04

Question: So I have searched high and low and nothing seems to work.  I bought this Lenovo p500 IdeaPad, got rid of Windows8 and threw Ubuntu 12.04 on here.
My Centrino Wireless-N 2230 card seems to be giving me trouble.  It will be at full speed at times (25MB down / 5.5 MB up) then drop to almost nothing (~2MB down / `0.5MB up) for no reason what so ever.  Usually within 5 minutes of rebooting.
I have tried everything out there on the web.  I have disabled Wireless N, I have turned off Power Management, I have disabled ipv6, etc etc.  Most changes seem to work initially and then not at all.  So is there a solution someone may have or help in the matter.  It has been a couple years since I have used Linux, so any help with commands and trouble shooting would be greatly appreciated.
Here are some terminal stuff:
rfkill list

1: ideapad_wlan: Wireless LAN
    Soft blocked: no
    Hard blocked: no
2: ideapad_bluetooth: Bluetooth
    Soft blocked: no
    Hard blocked: no
4: hci0: Bluetooth
    Soft blocked: no
    Hard blocked: no
5: phy1: Wireless LAN
    Soft blocked: no
    Hard blocked: no

iwconfig

eth0      no wireless extensions.

lo        no wireless extensions.

wlan0     IEEE 802.11bg  ESSID:"Birchcrest"
          Mode:Managed  Frequency:2.437 GHz  Access Point: 68:7F:74:D4:0A:FA
          Bit Rate=54 Mb/s   Tx-Power=16 dBm
          Retry  long limit:7   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=50/70  Signal level=-60 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:130  Invalid misc:203   Missed beacon:0
Answer: I have a Toshiba Portege z935 which had the same or similar issue. I believe there is a bug that won't allow Bluetooth and WLAN to operate at the same time on this card. To solve it, reboot into BIOS and disable Bluetooth in the Advanced settings (may be different on your model of computer).
Once Bluetooth was disabled, my WLAN worked fine.


Should I read Elantris before reading Warbreaker?

Question: As far as I know, those two are set in the same world, but tell a different story, is that correct? I know that Elantris came out first, but it's not available for Kindle and Warbreaker is freely available from the author's website. I have never read anything by Brandon Sanderson and while this guy is writing the ending of the Wheel of Time series which I loved years ago, I'd like to get to know his style. Can I read Warbreaker first? Will I miss on something? Can it be treated as a standalone novel even if I don't know the other books in the same setting?
Comment: actually the fantasy tag is blacklisted, because its too general to be of much use.
Comment: Sorry, I couldn't add more descriptive tags because of being new, there's neither fantasy nor brandon-sanderson, so feel free to create those and apply.
Comment: Not a fan of warbreaker at all, frankly
Comment: @Paul Well, I'm not a fan of Sanderson. :P From a perspective six years later.
Answer: As far as I have noticed, Elantris and Warbreaker are completely independent; there are no connections between their plots. They are, or might as well be, in completely different worlds. Both are also unconnected to the Mistborn trilogy.
Comment: The _world building_ in Elantris is solid.  The plot is ok and the writing is Brandon Sanderson's worse published (though I still enjoyed it).  It is also the book he wrote while in still  attending university.  Definitely read his later works first.
Comment: Now, after reading both, I agree that they aren't really connected and can be read in any order. However, in my own opinion, _Elantris_ is much worse than _Warbreaker_ and if I had read _Elantris_ first, I would probably have written off Sanderson entirely. Fortunately, I read _Warbreaker_ first (because it is available as a free ebook on the author's website - clever move, it worked in my instance and I began buying his other works, exactly as he intended) and was amazed by it, whereas I found _Elantris_ rather dull and unfulfilling. I'd recommend starting with _Warbreaker_ first.
Comment: This is correct. They are in different worlds and have different laws of magic. Both are excellent!
Comment: Thank you both, I'm going to read Warbreaker first and decide whether I like this author's writing.
Answer: To give a fuller answer than that Kevin Reid's,
Although they are set in different worlds, it is worth noting that they, like most of Sanderson's solo works (Alcatraz and excepted), take place in the same 'cosmere'.
An example of this is a character who shows up repeatedly in the background of them. The Way of Kings sheds a bit more light on this for the observant reader, so in that sense it would be worth reading The Way of Kings after the rest of his works, just to see if you can spot the shared character.
So although Warbreaker and Elantris don't impact each other plotwise, it would be worth noting that there is a background story hinted at in these, and will be dealt with slightly more overtly in the Stormlight Archive (book one of which is The Way of Kings).
Comment: There has definitely been more information released since this question has been asked about the cosmere as well....http://coppermind.17thshard.com/wiki/Cosmere
Answer: I'm hardly the most well-read sci-fi/fantasy reader, but Elantris feels less realistic to me.  If I were reading the two books without knowing anything about the actual chronology of publication, I would have immediately said Elantris felt much more like a first book than Warbreaker did.  (In fact Elantris is a first book, and Warbreaker's a much more recent one.)  The characters in Elantris are more unidimensional, the magical system is somewhat less complex (perhaps disputably), and so on.  So if you're looking for a richer story and characters, Warbreaker is better.  But both are still good entertainment regardless: Warbreaker is just more complex and more fulfilling.  I don't see an order as necessary for reading them, although I'd probably rather build up from good to better, personally, so I'd say start with Elantris and move to Warbreaker.
The Mistborn trilogy's also worth reading if you have time.  And last, I have The Way of Kings on my shelf waiting to be read, but I haven't started it yet.
Regarding style, do note that the style of The Gathering Storm and Towers of Midnight are a hybrid of Jordan's and Sanderson's styles.  Once you get into either book you lose yourself in the story quite readily and forget that it's a mixture of two styles, so don't worry about Sanderson overpowering Jordan.  That said, sometimes it's "obvious" (although Sanderson has said guesses about who wrote what are sometimes completely wrong) that an action-heavy, dialogue-heavy section is just too fast-paced and punchy to be anyone but Sanderson.  And that's a good thing!  While I'd prefer just a touch more of Jordan's deliberateness in the books, I much appreciate knowing there are no fifty-page bath scenes to get through, and that development never really slows throughout each book.  :-)  It's also nice to get books with only around a year's lag in between.  Sanderson's a machine compared to Jordan.
Answer: Brandon himself actually recommends Warbreaker as a good introduction to his work. You can download it for free from his website, where you can also find links to his short stories, novellas, and free sample chapters from his other books.
The simple answer to your question is: you can read Brandon's books in whichever order you want (I'm grouping the Mistborn trilogy together here), though many fans recommend saving Way of Kings until last.
The long answer is: the books are interrelated, but you don't have to know that or care about it to understand the story of the books themselves. They take place in a universe known as the cosmere, a galaxy that was once the home to Adonalsium, the power of creation. Adonalsium, however, was shattered into sixteen Shards, which settled on the various worlds of the cosmere (known by fans as Shardworlds), and became the source of life and magic on those planets.
Observant readers might have noticed that one specific character has appeared seemingly in several books. Yes, this is the same exact character, and he is our introduction to the story of the cosmere. The Mistborn trilogy gives us more clues, with the Way of Kings having the most references so far to this meta-plotline.


Difference in energy consumption between empty fridge and fridge filled with bottles of water

Question: I have about 12 bottles of water. If I want to minimize the energy consumption of my refrigerator, should I put these bottles in the fridge or leave them out?
Comment: Short comment here - I started a longer answer but bed calls - I may add it sometime. Placing water in bottles in the fridge will probably slightly reduce power consumption, but not by a large percentage of normal. Energy loss rates are proportional to temperature differential and not to amount of contents. But adding say 12 litres of water will reduce the volume of cold air in the fridge. When the door is opened less cold air will be lost and less warm air will enter and need to be cooled when the door is shut. A very rough estimate is that 360 Joule less cooling would be needed .
Comment: Having more thermal mass inside the fridge might have a slight effect on the cool/idle cycle for the compressor.  (With the bottles at thermal equilibrium, the compressor probably stays on longer when it does come on, but stays off longer between cycles because the thermal mass of the water means less change in fridge interior temp for the same energy loss through the insulation.)  IDK if that makes any difference to efficiency, though.
Answer: The fridge works by pumping heat from its interior to its exterior. The amount of work it needs to do is proportional to the amount of heat entering the interior (and also the temperature difference between interior and exterior).
There are two ways that heat gets into the interior:

Putting warm objects into the fridge.
Heat leaking through the walls of the fridge.

When you put a warm bottle of water into the fridge, there is a transient load associated with cooling that water down. However, once the water is cool, it has no further effect on the work that the fridge must do.
Heat leaks into the fridge at a rate that is proportional to the temperature difference between outside and inside. This leakage is constant, and is not affected in any way by any objects that may be inside the fridge.
Therefore, if the fridge is empty, you should just turn it off. If you want the water cool, you should put it inside the fridge and leave it on. However, you should not turn the fridge off and on frequently — there's a huge transient load associated with cooling down the interior walls, etc. of the fridge itself.
Also, every time you open the door, some of the cool air inside is replaced with warm air from outside. This also represents a small transient load, but if you're opening the door a lot, it can add up.
Comment: This is a great answer. There are many approaches to answering this type of question but understanding how to analyze the system, and the flows of energy involved, is key to being able to apply the trivial problem of water bottles and refrigerators to less trivial problems, independent of the specific material properties of air and water.
Comment: Following on from your last part about the air change when you open the door, another answer notes that having more space filled with water bottles would reduce the amount of air in the fridge that can be changed when the door opens, so if you're going to be opening the door a lot, having the bottles in there would reduce the amount of warm air that can come in each time, and help keep it cold. Water has huge heat capacity, though, so it may be that by adding even room-temperature water, you're adding more heat than the little bits of air would.
Comment: What about heat radiation?
Answer: There are two aspects to this.
First if your fridge is filled with anything other than air then you will save the energy associated with cold air escaping whenever you open the door.
However if you put bottles of water in your fridge it will take a lot more work by the fridge to cool them down than the equivalent volume of air as a litre of water at room temperature contains a lot more heat than a litre of air at the same temperature so more work is required from the fridge to cool a litre of water than a litre of air.
If you intend to put the bottles in the fridge at some point it is certainly better to fill the fridge now rather than put them in individually. But if you don't actually need the water to be cool ever it would be better to fill the spare space with empty bottle or blocks of styrofoam.
This is because of the relative specific heat capacities of air and water. The specific heat capacities of air and water by mass are 1 and 4 KJ/Kg·K, respectively, but water is around 1,000 times denser than air so the heat capacities by volume are different by a factor of 4,000.
So it is obvious that the energy wasted by loss of air when you open the fridge is fairly trivial compared to the work needed to cool the same volume of water.
Typically a fridge will use around 1 unit of mechanical power for every 3 units of cooling power.
So overall there is a small advantage in minimising the volume of free air in a fridge but it is only worth doing this by filling it with things that you want to refrigerate anyway or solids (or containers or foams) which have a low volumetric heat capacity.
This only applies to losses from opening the door though, once the contents are at a stable temperature it makes no difference to energy consumption what is actually in it, assuming that is is reasonably well-sealed.

Answer: If you have unused space in the fridge, then it's better to fill it with something than to leave it air.  This is because every time you open the door, less air will be exchanged with the room, so less to cool again.
If you're not going to open the fridge, then it doesn't matter.  As others have already pointed out, putting the water bottles in the fridge represents a one time energy cost.  Once they are cold, they cost no further energy, and reduce the volume of cold air lost when the door is opened.
However, if you are really after less energy usage and you have excess space in the fridge, the best long term answer is to get a smaller fridge.  Get one that is just large enough to hold what you need to keep cold.  In smaller fridges, the cold box has a smaller surface area, which is where heat comes in when everything is at steady temperature and the door isn't opened.  All else being equal, the fridge with the smallest cold box surface area will require the least power.
Of course all else isn't equal.  There are some cost/performance/longevity tradeoffs in the cooling system, but mostly it's about the insulation.  That is also a cost tradeoff, so different models have different power requirements for the same cold box.  At least here in the US, sellers are required to list power consumption figures for refrigerators.  Look for the one that requires the least power of those that have the minimum size cold box you need.
Other things you can do to minimize power consumption:
Make sure the radiator has good ventillation.  The cooling system is a heat pump that moves heat from the cold box to the outside of the fridge.  The radiator is where it gets rid of that heat.  If airflow to the radiator is blocked, then the heat pump has to work harder (make the radiator hotter) for the same cooling.  This costs power.
The radiator is usually a metal "mesh" sort of thing on the back of the fridge.  Modern fridges are designed so that there is some minimum space for air flow with the fridge backed up all the way against at wall.  Moving it out from the wall a little and making sure that air can flow in at the bottom and come out easily at top can help.
Keep the radiator clean.  Dust is a good insulator, which will make the cooling system work harder to push the exhaust heat thru the dust layer.
Put the fridge in a colder place if you can.  The colder the radiator, the less hard the cooling system has to work.
Minimize the time the door is open.  If you have several things to move in and out, open the door once, move everything in quick succession, then close the door.
Comment: I've never understood why people go to such lengths to hide their fridges away in closets and cabinets. It just impedes airflow around the coils, collects dust and reduces magnet real estate.
Answer: Many factors play in this scenario:
1- the shape of the bottles and their material thermal insulation index.
2-how you place the bottles on the shelves: do they promote air current or impede it.
3- the frequency of opening the fridge door.
As many have mentioned there is an initial load when room temperature bottles cool of.   but after that point everything else being equal it boils down two cases; penetration of heat into fridge due to design and manufacturing exigencies and material thermal properties of fridge without bottles versus contribution of bottles acting like the vanes of a cold radiator letting the stream of transient air wash around it.   So if the shape and placement of bottles doesn't encourage entrant air circulate easily it would help saving energy a bit.
ultimately if you fill up the entire available space with water past the initial pick of energy the chronic use of energy will be smaller.
we could look at this fridge as revers of a cooling tower. if we don't want to interact thermally with ambient air we make it hard by placing the bottles of water in a way that shields the other parts of the fridge from convection or ventilation. this concept has been used for centuries in middle eastern architecture, eg, passive air-conditioning.
Answer: The added weight of the water bottles will cause the contact patch between the feet of the refrigerator and the floor to deform ever so slightly, thus making better thermal contact between the feet and the (presumably warmer) floor.  Hence, the addition of the water bottles will increase the heat loss through the feet by an amount so small as to be undetectable by even the most sensitive heat flux sensors.


Why did Nazi soldiers do Hitler's bidding?

Question: The atrocities committed by Nazi soldiers during World War II are well known. I'd like to know what motivated those soldiers to do Hitler's bidding. Were they brainwashed? Did they believe they were doing the right thing in killing 6 million (Jewish) people? How could so many soldiers willingly and consistently execute thousands of defenseless and innocent people, including children, day after day?
Comment: It's a bad question because at least half the historiography emphasises the fact that *they didn't* do Hitler's bidding, they did their own bidding, and the bidding implicit in German military understandings of civil disorder and race in Europe.
Comment: I didn't downvote the question; is it mandatory to downvote when leaving comments that a question is historiographically misinformed and thus incorrectly premised?  Because I don't see a reason to downvote innocence.
Comment: Also bear in mind that Hitler didn't invent racism or anti-semitism. There was a long history of suspicion and dehumanization against Jews (and other oppressed groups) that intermittently erupted into violence. The holocaust was certainly a new level of systematic brutality, but it didn't come out of nowhere.
Comment: When you say Nazi soldiers, I don't think you separate SS from regular army. Maybe they should be.
Comment: No, Nikko, they most certainly should not.  6 Army's involvement in the clearance action of Kiev (Babi Yar Gorge); and the regular detachment of Wehrmacht troops to clearance, Jew hunt and anti-partisan operations is clear in the historiography.
Comment: -1. Is this trolling?
Comment: Brunhilde Pomsel said [in a recent interview:](https://www.theguardian.com/world/2016/aug/15/brunhilde-pomsel-nazi-joseph-goebbels-propaganda-machine) that:
"Those people nowadays who say they would have stood up against the Nazis – I believe they are sincere in meaning that, but believe me, most of them wouldn't have." After the rise of the Nazi party, "the whole country was as if under a kind of a spell," she insists. "I could open myself up to the accusations that I wasn't interested in politics but the truth is, the idealism of youth might easily have led to you having your neck broken."
Comment: They swore an allegiance to Hitler directly instead of Germany.  That is certainly a part of the reason (and mentioned by some former soldiers).
Comment: 6 million is not that big compared to the millions of enemies they want to kill outside. If they believe that the jews would stab them in the back as 5th columns and that by killing those jews they'll be saving german lives, I do not think it's  hard to imagine. Not to justify the act, but to say it's not understandable simply means stupid.
Comment: @samuel russell: the Wehrmacht as an institution was certainly deeply implicated in war crimes (contrary to what many people believed for a long time); however, the bulk of Wehrmacht soldiers probably did not participate in crimes, whereas the balk of SS men did. Therefore a certan distinction can be useful.
Comment: ask German soldiers... they are the only ones that can answer this question correctly...
Comment: Did you go through all the effort of creating an account just to post this ??
Comment: This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://history.stackexchange.com/faq#reputation) you will be able to [comment on any post](http://history.stackexchange.com/privileges/comment).
Comment: Strongly recommend Ordinary Men Reserve Police Battalion 101 by Christopher Browning
Answer: I have to recommend the recent book Soldaten: On Fighting, Killing, and Dying by a historian and social psychologist here, as there isn't are more objective source for understanding the mindset of those German soldiers during WWII as their own conversations:

A trove of previously unpublished, transcribed conversations among German POWs—secretly recorded by the Allies—reveals the extent of their brutality and changes our understanding of the mind-set of the German soldier during World War II.
On a visit to the British National Archive in 2001, Sonke Neitzel made a remarkable discovery: reams of meticulously transcribed conversations among German POWs that had been covertly recorded and recently declassified. Neitzel would later find another collection of transcriptions, twice as extensive, in the National Archive in Washington, D.C. These were discoveries that would provide a unique and profoundly important window into the true mentality of the soldiers in the Wehrmacht, the Luftwaffe, the German navy, and the military in general—almost all of whom had insisted on their own honorable behavior during the war. Collaborating with renowned social psychologist Harald Welzer, Neitzel examines these conversations—and the casual, pitiless brutality omnipresent in them—from a historical and psychological perspective, and in reconstructing the frameworks and situations behind these conversations, they have created a powerful narrative of wartime experience.

Let me quote some passages with author Neitzel in an BBC interview:

One of the authors, Professor Sonke Neitzel, cites, for example, a
captured Italian admiral who tells a fellow prisoner that "everyone
was running away and I couldn't defend Sicily". Then he adds
tellingly, "I had the idea of running away as well".
Professor Neitzel says no German officer would ever have said that.
He told the BBC that the attitude of the Italian soldiers revealed in
the transcripts was that they thought their state was corrupt and that
their leadership was corrupt, so their view was: "Why should we, small
soldiers, risk our lives for this corruption?"

Further:

Professor Neitzel says attitudes to the state and authority determined
what a soldier did at the "point of surrender". Italians were most
likely to surrender and the Japanese least. The German attitude, as
revealed in the conversations, was: "I fought well but I lost so now I
go into British captivity".
In contrast, the Japanese attitude was one of deep shame to have been
captured, a shame which British and American intelligence exploited.

Further:

Professor Neitzel told the BBC he doesn't believe any nation had
soldiers, who were "naturally" more brutal than any other. The Allies,
he said, took no prisoners in the early days of the Normandy landings.
But the transcripts reveal a picture of brutality that is
uncomfortable for Germans today.
This, Professor Neitzel thinks, may stem from the great certainty
about the worth of their cause, that the German soldiers revealed in
their private conversations.
"German society had a special attitude to military behaviour which
was, 'Never be weak'. You have to obey orders, so German counter-
insurgency depended on extreme violence at the beginning in the belief
that this would save German blood in the long term. Only winning
matters."

Both authors argue that Nazi soldiers were no more naturally violent than those anywhere else, but they did it in a very organized and systematic way. If you look at Chechnya war or some Wikileaks videos you see that obedience to orders even nowadays is the same dominant psychological pattern among soldiers and the "level" of brutality doesn't really differ qualitatively. The end justifies the means in war. Nearly everyone can become a mass murderer in war within few days.
Another article about the book states:

It makes sense that war brutalizes people. Anyone who is exposed to
extreme violence over an extended period of time eventually loses his
inhibitions and becomes a perpetrator of violence himself. This is the
view held by academics that study violence from a socio-psychological
point of view. It's a view that is supported by the autobiographical
literature, where men appear to go from stroking their children's hair
one moment to being cold-blooded killers the next. [...]
But anyone who reads the wiretapping transcripts that Neitzel and
Welzer have analyzed is forced to conclude that it doesn't take much
to convince men in uniform to kill others. In many cases, it appeared
to take just a few days before the soldiers lost their inhibitions
about taking lives. In fact, more than a few even openly admitted to
enjoying the act of killing.[...]
The victim is merely the target, to be shot and destroyed -- be it a
ship, a building, a train or even a cyclist, a pedestrian or a woman
pushing a baby carriage. Only in very few cases do the soldiers show
remorse over the fate of innocent civilians, while empathy is almost
completely absent from their conversations. "The victim in an empathic
sense doesn't appear in the accounts," the authors conclude. Many of
the bugged Wehrmacht soldiers also do not distinguish between civilian
and military targets. In fact, just a short time after the beginning
of the war, such distinctions did not exist except on paper. Following
the attack on the Soviet Union, no distinctions were made at all.[...]
The Red Army was hardly inferior to the Wehrmacht in terms of its
propensity for violence. In fact, the pronounced culture of violence
on both sides led to a disastrous radicalization of the war in the
East. The Anglo-Saxon forces behaved in a far more civilized way, at
least after the first phase of the fighting in Normandy, in which the
Western allies also took no prisoners.[...]
The way a body of soldiers proceeds in the regular use of violence is
not dependent on the individual. Putting one's faith in self-restraint
would be to misunderstand the psychodynamics of armed conflicts. What
is in fact critical is the expectation of discipline that comes from
above.[...]
War crimes occur in almost every prolonged armed conflict, as
evidenced recently by the photos taken by an American "kill team" in
Afghanistan, which shocked the public when the images were published
two weeks ago. Everything depends on whether these crimes are also
seen as crimes by the military leadership and if the perpetrators are
then punished accordingly. Even before the war against the Soviet
Union, the Wehrmacht leadership established that there was no need to
punish soldiers for attacks on Russian civilians, and that Red Army
officers were to be shot immediately.[...]
The proportion of people in the Wehrmacht with a nature proclivity for
violence or sadism was presumably about 5 percent, just as it is in
all social groups. According to researchers, this is the percentage of
the population whose sociopathic tendencies are kept in check during
peacetime by the threat of punishment. From 1939 onwards, at the
latest, the composition of the Wehrmacht reflected the average male
population, that is, ordinary Germany.[...]
"From 1941 onward, the same people who had reacted with skepticism to
the Nazi takeover in 1933 watched the deportation trains departing
from the Grunewald train station (in Berlin)," the authors write.
"Quite a few of them had already bought 'Aryanized' (ed's note: seized
from Jews) kitchen fittings, living room furniture and artworks. Some
ran businesses or lived in buildings that had been taken away from
their Jewish owners. And they felt that this was completely normal."

This got a bit long with mainly quotes, but it's a important and tricky question where any personal reasoning without facts would be highly unreliable to me.
Comment: Not? How do you know not? You mean other armies don't mass murder people? You mean those guns are toys.
Comment: There are first hand accounts of Germans participating in the genocide on http://www.holocaustresearchproject.org/einsatz/ It's gruesome reading but provides insight into the mentality of the perpetrators and willing witnesses.
Comment: This does not explain the specifics of Wehrmacht. You just say that this because of war and that any army can be brutal. But in fact this is not how the things occur in other armies.
Comment: Recently I encountered an argument that German soldiers were normally and regularly given metamphetamine to reduce need for sleep, increase focus, etc. and one of the side effects is supposedly reduced empathy.
Answer: The simple answer (and here I agree with @Evan Harper's comment) is deference to authority and careful planning by Nazis to hide the truth of what they were doing.
Deference To Authority
The most easily understood example of this it the Milgram exmperiment. This experiment was especially motivated by Holocaust trials. A summary from Milgram of the experiment read:

The legal and philosophic aspects of obedience are of enormous importance,  but they say very little about how most people behave in
  concrete situations. I  set up a simple experiment at Yale University
  to test how much pain an ordinary  citizen would inflict on another
  person simply because he was ordered to by an  experimental scientist.
  Stark authority was pitted against the subjects'  [participants']
  strongest moral imperatives against hurting others, and, with the
  subjects' [participants'] ears ringing with the screams of the
  victims, authority  won more often than not. The extreme willingness
  of adults to go to almost any lengths on the command of an authority
  constitutes the chief finding of the study  and the fact most urgently
  demanding explanation.
Ordinary people, simply doing their jobs, and without any particular hostility on their part, can become agents in a terrible
  destructive process. Moreover, even when the destructive effects of
  their work become patently clear, and they are asked to carry out
  actions incompatible with fundamental standards of morality,
  relatively few people have the resources needed to resist authority.

(65% of people committed what they believed was murder on the basis of authority, though they showed signs of stress and rebelliousness.)
Non-public Executions
The Holocaust was not really public information. For the majority of the Nazi Regime, Jews were mostly imprisoned in concentration camps. It was only in 1942 that extermination camps, where mass murders took place, were started. These extermination camps were not set up in Germany itself, but occupied Poland. Part of the reason was to hide the fact of the killings from the civil populace. Killing was mostly carried out by poison gas, which was considered to be psychologically acceptable to the soldiers operating the camp (besides being efficient). The holocaust was itself referred to the Holocaust as Endlösung der Judenfrage (Final Solution of the Jewish Question).
Comment: +1 milgram experiment is a important building block here. As you wrote, "stress  and rebelliousness" forced nazis to interchange killing troops.
Comment: I just want to point out that in the cases of other regimes and crimes against innocent people there were much more cases of resistance by the personnel, so deference to authority cannot simply explain the case.
Comment: Regarding non-public executions they may have been non-public in Poland but in the territory of the USSR the execution were mostly public and not only of Jews but also of Slavs. Many of them were made public intentionally to terrorize the population and Wehrmacht took active part in them.
Answer: The gas chambers were intentionally chosen to make it easy to kill lots of people. The Germans tried shooting gypsies and disabled people (the first victims) but their soldiers wouldn't be able to do it for long. It upset them. The Nazi party needed an easier way to kill lots of people.
The gas chamber was easy for their soldiers because one group of soldiers could escort the victims at the start when they were alive, and the victims would take off their clothes and get naked themselves, then they'd be killed, then another group of soldiers would only have to deal with dead bodies. There would not be soldiers who saw the killings, nor soldiers who saw the live people and then pressed the buttons. Since the victims were naked, the soldiers didn't have to remove clothes from the bodies. It was easy to keep the dead bodies out of sight.
Comment: It's an interesting take on this tragedy: can you identify some sources, pls?
Answer: I'm looking at "The Good Old Days" The Holocaust as Seen by Its Perpetrators and Bystanders, and at the Police Battalion studies, and I'm still thinking functionalism is more explanatory than intentionalism.  Ordinary Germans, including the vast majority of the Wehrmacht, shared a racialist politics and during the circumstances of the war shared a common attitude towards resolving the racial problems of Jews and eastern and southern Slavs.  Hitler's involvement was not decisive, as the rate of spontaneous massacre and the mixed class background of the Police Battalion soldiers demonstrates.
Expanded:
The historiography of the holocaust emphasises two causative accounts (both explained in depth at wikipedia with adequate citations there).  The first is "intentionalism," this broadly focuses on Hitler's unique culpability for the decisions behind the holocaust, or limits these decisions to the inner circle of the NSDAP leadership or the Wehrmacht.  Much of the US case at Nuremberg was intentionalist in its attitude to the causes of war crime.
Later scholarship evidenced the mass and widespread culpability of Wehrmacht soldiers, and in particular second line soldiers such at the soldiers of the Police Battalions.  These soldiers were ordinary Germans.  In the case of the Police Battalion studies, it was demonstrated that the class and occupational composition of these Battalions directly mirrored the class and occupational composition of Germany as a whole—they were representative males.  In particular, they were older males who under the intentionalist schema of "brainwashed SS boys" should not have engaged in mass killings.  But in the East, and in the West, and in the South—but, most particularly in the East and South (Soviet Union and Yugoslavia)—these ordinary men engaged quite willingly in voluntary Jew hunting and massacres of civilians.  Evidence accumulated that Jew hunting and massacres were entirely voluntary, and that soldiers who showed no willingness to engage in massacres were allowed without punishment, scorn or humiliation to not engage in these activities.  Jew hunting was discovered to be constructed as leisure by ordinary soldiers.  This greatly strengthened the "functionalist" side of the argument, that the holocaust emerged out of functional requirements of the entire German war, that mass massacres and genocide were the ordinary business and outcome of war.
Genocide studies has furthered these findings.  Current work in genocide studies engages the individual "massacre" as the unit of analysis, rather than the entire genocide.  In part this is done because of the understanding developed from the German studies of the importance of ordinary participants and their attitudes.
While I primarily read genocide studies in the field of Soviet atrocities and attempts to analyse Soviet and Soviet-style atrocities as a singular whole, my understanding is that placing "Hitler" or "Nazism" as central to the holocaust is widely discredited; even where the unique contributions of Nazi ideology or organisational doctrine gave the holocaust distinctive colour.  Historians rarely accept dichotomies without showing how they interpenetrate; but crude intentionalism is clearly discredited.  Hitler was not directly responsible for the holocaust, except of course that he tolerated it, encouraged it, sought to order it, and perceived the German desire for it.
(Here you should consider reading about the history of Einsatzgruppen A in the Baltic states, its composition, and its eventual failure to achieve its stated aims due to psychological wear and tear.  Einsatzgruppen A was comprised of NSDAP ideologues with higher University degrees, who believed in the racial purification of Germany and its mission of Empire in the East—and even they proved incapable of continuous intimate massacre despite their ardent beliefs in the NSDAP mission.)
Soldiers did not have to be motivated by or for Hitler to engage in atrocities.  Atrocities were a historical part of the German method of waging war.  (Even as they were part of the Japanese, or British, or Australian, or Soviet ways of waging war.)  German soldiers voluntarily and with eagerness began implementing the basic program of the holocaust, and would have done so in the Soviet Union even without widespread official encouragement and support from directly NSDAP motivated and controlled organisations such as the Einsatzgruppern.  In particular, the commissar order and anti-partisan operations were conducted with gusto and enjoyment.  Germans also broadly agreed with the racial categories the NSDAP used, largely because the NSDAP's ideology was a mirror of German racialism.
German soldiers did not set out to kill six million Jews.  They set out to punish Jews, Slavs and Communists as categories.  The actual result of this was tens of millions of dead central and eastern europeans.  Jews were especially singled out for special treatment in this schema, but the programme was the broad punishment including by collective death by massacre or starvation of Eastern and Southern Slavs generally, and specific cultural groups like Roma or Jews in particular. Even the formerly social democratic or communist German soldiers, such as in the police battalions, identified with the goal of punishing Jews and Slavs.  Sometimes this punishment involved forced labour (conducted primarily as a form of ritualised humiliation with Jews, rather than for primarily economic gain).  Sometimes this involved mass murder, industrial deportation of populations for a widely recognised final solution, or death marching prisoners with insufficient sources of food, clothing, shelter or medicine with a full awareness of the results.
Most current work points to the capture of large numbers of Soviet POWS in the transition from sporadic massacre to systematic attempts to destroy entire population groups, a "functionalist" analysis.  POW camps for Soviet soldiers were run with a mentality of causing large scale deaths.
However, intentionalists can point to the NSDAP plans for the annihilation by starvation of all Jews and most Slavs West of the projected 1941 stop lines over the 1941-1942 winter.  Indeed, the Wehrmacht's occupation planning attempted to implement just this.  The targets of the holocaust, both in the minds of ordinary Germans, and in the planning of the NSDAP organs and organs that predated the NSDAP such as the junker dominated military synchronised in 1941.  (Much of this comes out in Soviet evidence to Nuremberg which was always more functionalist).
Finally the question of how could soldiers willingly and consistently execute thousands of people day in day out?  They couldn't.  Einsatzgruppen A broke down under the psychological stress of mass executions, even using Baltic Hiwis to do the nasty work.  Jew hunting and anti-partisan massacres were highlights, rewards, in the boring life of rear area policing.  For front line units seconded to anti-partisan or clearance operations, they provided a welcome relief and a source of leisure in a far lower intensity environment.

The moral questions regarding personal culpability have for a long time focused on the blandness and ordinary nature of attempting to systematically annihilate civilian population groups.  For current research I'd suggest starting with Chirot and McCauley (2006) Why Not Kill Them All?: The Logic and Prevention of Mass Political Murder.
Comment: Germans were known for better following the laws of war in WWI than Russians did. They treated the POWs well and did respect the rights of Jews which many Russians did not. Many people who remembered WWI thought that Germans would behave similarly in WWII. That's why there were so many Soviet POWs initially.
Comment: But in the WWI there were no such hostilities which points at the Nazi guilt at least partly. Possibly the soldiers were not needed to be motivated for hostilities, but any normal state usually punishes the soldiers who commit ones. In this light quite indicative the Hitler's amnesty orders and requests to exempt soldiers who commited crimes on POWs of any punishment.
Comment: And I don't see the point—the causative factor I'm discussing is militaries maintaining control over hostile civil populations, and conceptions of reviled others in this context.  Prior to WWI German activity in its colonies did closely resemble activity in the East and South in WWII (as did UK activity in some of its colonies).  There isn't a specific attack on "Germanness" in the functionalism I'm discussing.
Comment: Also, regarding "clearance actions" the conduct in Hungary in 1919 of all forces.  Need we get into the events where military functions and ethno-cultural policing intersected in the failing Ottoman Empire?
Comment: You might want to read about both infantry troops with reputations for "excess" in skirmish—I'm thinking Australians, but only because this has been mentioned—and also the conduct of warfare as extended in the East.  Particularly the clearance actions of whites, reds, greens and blues in 1919.  Military services rarely adequately investigate enthusiastic conduct by troops, the "Breaker Morant" incidents were about discretionary and selective enforcement as much as white Europeans being on the end of colonial warfare.
Answer: I usually don't share my family history, but here it goes: my grandfather was Waffen SS. My understanding is he wanted to be the best first and foremost. The Waffen SS was just that. Second, he actually believed what he was doing was right for Germany (I disagree). Third, as the war dragged on and many of his comrades were killed, he fought not so much for Hitler or das Vaterland, but for the man to his right and left.
He was later arrests and did not pay nearly enough of what he probably should have, but he paid. One of the other posters said this and I agree, war is the absence of civility and all soldiers from all countries have done some rather horrific things.
Comment: a brave admission, and I commend you for it.
Answer: Jews were (and in many placed in East Europe still are) very much hated by the population mostly because it is believed that they are guilty in killing Jesus Christ.
In Russian Empire for instance there were multiple bloody anti-Jewish pogroms. The only reason why the Jews were not killed by the non-Jewish population at the time was that the state mostly made efforts to protect the Jews or at least to limit the extent of hostilities.
When the state power was becoming weak, the scale of hostilities usually rose dramatically. For example during Russian civil war about 200000 Jews were killed even though no party of the conflict officially endorsed extermination of the Jews.
So once the state power completely changed their attitude from protecting the Jews or at worst, negligence to officially endorsing the killings and supporting that with additional propaganda efforts the effect was predictable.
The already anti-Semitic population that in most cases was willing to kill the Jews even despite the resistance of the state, was intentionally further indoctrinated against Jews and any remaining restrains lifted.
Answer: As Goebbels (Germany's propaganda Minister) said, "people will believe anything they see or hear 3 times." As Germany's depression deepened they were looking for a scapegoat and found the Jews who had killed Jesus. They were vilified and blamed for every wrong (see the mid east today). All evils/trials/hardships were blamed on the Jews and the hatred grew. No one wanted the Jews throughout all Europe.
The Jews were the only bankers and the only place to go for capital, (Christians/Catholics were forbidden to charge interest). Resentments grew as loans were not given or the terms of the loan were demanded to be honored. Even as knowledge of the atrocities grew, no one politically wanted to be seen helping the Jews. The vast majority of the German people believed killing Jews would make a better world. It was rare for anyone to maintain their compassion in the onslaught of such constant propaganda. Even after the war all of Europe and the US did not want the surviving Jews. Thus Israel was created.
Comment: This would benefit substantially from some references for the assertions that are made.
Answer: Adolf  Hitler's goal in life was initially to become an artist. However, the Academy of Fine Arts Vienna denied Hitler's admission twice, in 1907 and 1908.

Hitler states in Mein Kampf that he first became an antisemite in Vienna.... Hitler became embittered over the collapse of the war effort [World War I], and his ideological development began to firmly take shape.... The experience reinforced his passionate German patriotism and he was shocked by Germany's capitulation in November 1918.... The Versailles Treaty and the economic, social, and political conditions in Germany after the war were later exploited by Hitler for political gains. Adolf Hitler -Wikipedia

So, by the end of World War I, Hitler was strongly patriotic and anti-semitite. He stayed in the army after WWI and eventually was assigned to monitor the  German Workers' Party (DAP).
The DAP was strongly antisemitic, nationalistic, anti-capitalistic, and anti-Marxist. It favored a "strong active government, a 'non-Jewish' version of socialism, and solidarity among all members of society."
The president of the party, Anton Drexler was attracted to Hitler's oratory skills and invited Hitler to join, which he did. By 1921, Hitler had became known as a notorious speaker and became the leader of the DAP (which eventually came to be known as the Nazi party).

Alfons Heck, a former member of the Hitler Youth, describes the reaction to a speech by Hitler: "We erupted into a frenzy of nationalistic pride that bordered on hysteria. For minutes on end, we shouted at the top of our lungs, with tears streaming down our faces: Sieg Heil, Sieg Heil, Sieg Heil! From that moment on, I belonged to Adolf Hitler body and soul".

So as we see, Hitlers used his oratory skills to persuade the Germans to adopt his anti-sematic, anti-communist, totalitarian views. Hitler eventually rose to power and held grand rallies and made persuasive speeches with much Nazi Propaganda. Many Germans came to hold his views that Semitic and Romani races were inferior to Aryan races. Nazism openly declared Slavs as subhuman, however they slacked off on this idea somewhat when they became allies with Bulgaria, Croatia, and Slovakia.
Also, many Germans were still bitter of their loss of WWI. Their was a popular stab-in-the-back theory which Hitler supported. It claimed that Germany had never lost a war and that the German Army did not lose World War I, but was betrayed by the civilians and politicians on the home front. It has been stated that the stab-in-the-back theory was "an ideological cement of Hitler's dictatorship." The Germans were bitter at the the Allied powers, but mainly at the French who had occupied Germany during post-World War I. This pushed them to obey Hitler as he promised to repudiate the Treaty of Versailles. So this wasn't a case of brainwashing. There were two main factors at play here:

Many Germans believed that the Aryans were a superior race. This belief was supported by Nazism. Those that disagreed could receive the same treatment as the "inferior races" if they spoke out publicly.
The Germans were strongly patriotic and wanted to make up for their humiliation in WWI. This was the stronger of the two reasons.

These two factors were supported by Hitler and formed the basis and ideology of Nazism. This motivated the many of the Germans to the bitter end.
Comment: -1. While it seems paradoxical, it is _not_ accurate that most rank-and-file German soldiers, even those who committed tremendous atrocities, were motivated by ideological hatred. The key factors were deference to authority ("just following orders") and group-think. (In fairness this is somewhat controversial, you have the Goldhagen followers who insist that it all happened because German culture was fanatically antisemitic, but the Christopher Browning "Ordinary Men" school of thought predominates.)
Comment: Wehrmacht committed many crimes not only against Jews but also against Slavs and even against innocent French. Thus the atrocities cannot be attributed to anti-Semitism solely.
Comment: Evan, I have to disagree with you regarding deference to authority and group-think, and I'd cite the voluntary and participatory nature of small unit clearance actions in the Soviet Union and Yugoslavia.  This, of course, doesn't legitimise the concept of ideological hatred—IIRC "Jewishness," "Communistness" and "Partisanness" were all abberant behaviour structures connected only with ideology of the "dominant social ideology" kind, not the kind imparted by propaganda over a miniscule 10 year period of rule.
Comment: Coming back to this years later after trying to Google something else, I have to say that I was wrong and @SamuelRussell was right. Few German soldiers were ranting fanatics like Hitler, but it was a deeply ideological army, and ordinary *Landser* were fairly steeped in hatred. The contrary view is very convenient and widely held today (hence upvotes) but it doesn't stand up under good modern scholarship. The top answer recommending *Soldaten* is a good one; read it and you'll see how ideological the ordinary *Landser* really was.
Comment: this is all true, but I don't think it actually answers the OP's question


What is the meditation and what is its purpose?

Question: Is meditation thinking about thoughts?
Is it rational thinking about our perceptions?
What is meditation? What is the purpose of it?
Can I gain supernatural powers via meditation?
Answer: Meditation is when the mind comes back home. When the mind comes back home it can sit by the fire and enjoy its own warmth. It can stop being busy with all kinds of "doing". Meditation is the ultimate "not-doing". Just sit in presence and let the nature of things take care of itself.
Meditation is not thinking. It's more like watching the cows graze. The cows represent thoughts, if they start misbehaving you show them their place -- other than that, you just let them graze. When the mind watches itself, there is some processing going on, some laundering, some mending and healing, some connecting, some letting go.
The practical purpose of meditation, beside processing, mending and healing, is to reunite with the original state of "this is enough", "this is peaceful". The supramundane purpose of meditation is to lose form and go deep into formless, the real nature of things.
When you completely lose attachment to any form, you get supernatural powers - yes.
Answer: If I am to give a short answer to your question/questions…. You will find the answer to all of your questions if you begin to deviate from the conventional way of thinking and proceed towards a new thinking pattern which is free from causing suffering. I can give you only one example of this otherness.
I believe that you have a fair understanding of the operation of the primary elements in a mind. Let me take this example. Let's take an individual who practices meditation. Supposing, someone visits him at the time of meditating, he would get irritated and consider this incident to be an hindrance to his meditation practice. He would resist, thinking,  " outsiders always get in my way. It is very difficult to practice meditation with the undue presence of outsiders…". Why does he get infuriated at this obstruction? His mind has overly embraced his meditation practice; he has excessively attached to the practice; he has locked himself in the practice.
If you can perceive this incident in another light…  the operation of pathavi element in his mind is so intense here. The mind has provided free access (operation of apo) for thoughts to be locked with the obstruction to meditation practice. Due to this freedom present in the mind (operation of apo), thoughts could easily get locked, compressed (operation of pathavi) with the obstruction. As a result of the operation of pathavi element followed by the free access accommodated by the apo element, heat (tejo) begins to rise to a higher degree in the mind. The resultant intense degree of heat generates a similar degree of magnetic energy (kama) in the mind. The higher the degree of heat, the higher the degree of magnetic energy in the mind. The magnetic energy generated in this manner has the potential of making vibrations, movements (in other atoms). As magnetic energy, with the potential of making vibrations, is incorporated and carried in these elements, they are identified as "elements of vayo" (vayo dhatu). This is how  the functioning of the four primary elements takes place at a time like this, beginning with pathavi dhatu, in the mind.
A meditator ought to have developed a stable mental state where he could perceive his respiration and what takes place within very clearly. In other words, the meditator needs a strong Samadhi (concentration) to accomplish the practice in this way. The meditator who contemplates the mental phenomena with a strong mindfulness based on the Samadhi, would perceive the changes in the mind on the basis of dhatu manasikara. Such a mind can find answers to the kind of questions that you have raised in an experiential way, and not just intellectually.
Answer: Meditation is when you stop thinking.
The purpose of meditation is to gain insight on the nature of reality (Who am I? Why I exist? Why everything exist? How it exists? What is suffering? Why is there suffering? What is happiness? etc.).
While in meditation, by attentively observing that which arises, insight can be gained.
You will most likely not gain supernatural powers by meditation. You will probably have experiences where it feels like you gained supernatural powers.
Comment: 1. I stop thinking during deep sleep. so is it meditation? 2. to gain insight do i have to think (e.g.who I am and how everything exists etc...)
Comment: 1. No. 2. Yes and no. You have to stop thinking. Then you have to start thinking. Then again stop and again start. During this process you must observe how and why from no thinking arises thinking. If you'll observe attentively enough, you will gain insight.
Answer: meditation is a way to develop our mind , so as to keep it without wandering here and there and you have to keep it in wholesome thought then only you can develop wisdom