All three of my managers know my salary (of course).
Apart from that, people with whom I am close with know my salary and I know theirs. Mine is the lowest even though one of my friend is IC1 and I am IC2, others are senior to me.
Some of them tell me to talk to the manager for my salary. My priority is learning, so it doesn't bother me much. But I did talk to the manager (and her manager's manager too), because if you don't, they take you for granted.
By knowing I had the lowest salary gives me lot of opportunities to crack jokes :-)
From an office scenario, having a coworker knowing your salary is very different to having a close friend knowing your salary. This is especially true if the average salary of your peers makes it difficult to have a comfortable lifestyle. Luckily for the most of the HN crowd, this is not the case.
Salary is something I have an open discussion with my manager about, actually my manager encourage this type of discussion with him. This is a healthy practice.