1. 4

    I’m a little nervous reading #4a: User/Pass management.

    The example given is

    $ sudo userpass -a foosite -u userbar -p hunter2 -m Foo
    

    Unfortunately, all of that is saved in .bash_history so it doesn’t matter who owns the final file that gets written out. A bad guy just needs to history | grep userpass

    1. 1

      Yep – this is yet another case where I think a “low quality”, “bad advice”, or just plain “I don’t like this” downvote option is sorely needed.

      1. 2

        I few notes though: The scripts in the article were mostly of the “scratch-an-itch” variant, and not a “everyone should be using this”. The title reflects this with “Why I love linux”, and not “8 Awesomes Scripts that Will Make you Love Linux” :)

        Also, the problem .bash_history is the smallest issue of them all. To access this file, you need to have access level of the user, or root. At that point, I’d be already pretty fucked. http://xkcd.com/1200/

        The bigger issue, would be other users on the system monitoring /proc/*/cmdline

        The first can be resolved by enabling HISTCONTROL=ignorespace, and starting commands you want to hide from the history with a prefix space. To avoid both problems, replace the input of the password with (read -s -p “Password: ” password).

        Secondly, and more gravely. Is if someone were to use this on a laptop they carry around with them, and lose it. Anyone can read the file by booting up a LiveCD OS, and accessing the disk contents. For this, the password file should be encrypted, and decrypted on the fly.

        Even better, would be to use something like http://www.passwordstore.org/ instead. For my needs, on a stationary laptop, with a single user, and no mean people to worry about roaming about. It is secure enough.

        Anyway. I’m sorry you found it low quality. It was never my intention for it to pretense as a beacon of excellent code and scripts.

        Cheers.

        1. 1

          Yes, passwords-in-command-line-arguments is a pretty bad idea, as is unencrypted password storage.

          However, also squarely in the bad-ideas category is storing passwords (even encrypted) in a file whose name identifies exactly what system or service it’s for (have all the recent NSA revelations taught us nothing about metadata?). Unfortunately, doing exactly that seems to be a central design element of that program (‘pass’). I really wish people would stop recommending it; it’s just not at all well-designed.

    1. 3

      I haven’t been following this story, though I learned a high altitude version of it via osmosis somehow.

      Here’s all I know so far:

      • The inventor of JS gets hired to Moz (cool makes sense)
      • Some people complain about his stance on prop 8 (ah yes, I remember that; that’s expected)
      • Brendan steps down (woah, why?)

      I get that there are a lot of people upset by his stance on prop 8, but I don’t really see any connection between his personal views and his ability to lead Mozilla.

      Serious question: What am I missing?

      1. 13

        I think part of the reason the anger intensified was Eich’s relative lack of action/inability to get in front of the issue. When he finally did to an interview on the subject, it was several days after the announcement, well after everyone was up in arms, and the summary was “I don’t really want to talk about it, it’s my personal belief.”

        Now, on the one hand, I can understand the desire to separate personal beliefs from public life, but on the other, that’s a very – sorry to use the term – privileged response. What he’s essentially asserting is that “I get to try to effect your personal life, and you shouldn’t be allowed to question me for it.” This – at least – was the response of the community of people who felt that Eich was in the wrong. I think also there was a sense of Eich trying to have his cake and eat it too – saying (paraphrase), “Mozilla is an open organization which support LGBT equality” is disingenuous when you – the newly minted leader of that organization – have shown evidence that you don’t. Like it or not, personal opinion and belief are relevant, since they will inform your decisions as CEO.

        Ultimately, he didn’t step down because he felt bad, or as some act of contrition – he stepped down because of bad PR. When big sites start telling you to use other browsers because of your CEO’s stance on gay rights, it doesn’t matter whether or not the CEO is going to make all future decisions perfectly and solve all of the worlds problems, ultimately, people won’t buy/use your product, and that’s not something Mozilla wants or can afford. From the second this happened, Eich’s response was slow, somewhat arrogant, and ultimately poor politics – which is to be expected, since he’s an engineer and not someone necessarily interested in being a politician – but ultimately a CEO is just a politician of sorts, and Eich’s relative inability on that front could not be made up for by his ability as an engineer.

        That said, I don’t care what people think, the man invented Javascript, he doesn’t deserve to be CEO, he deserves to be stood in a corner and told why he’s a very naughty boy.

        (the last part was in jest, mostly).

        1. 3

          Eich’s relative lack of action/inability to get in front of the issue. When he finally did to an interview on the subject, it was several days after the announcement,

          You are presumed guilty until proven innocent. Also, there is a time limit of 48 hours in which to present your case. Unless somebody on twitter comes up with a catchy hashtag, then you only have 24 hours. Unless you are getting on a 12 hour flight with no internet access, then you only have those 12 hours.

          1. 4

            This isn’t the law. This is politics – he failed to get out ahead of a story, that’s not a good thing. Reason is not the realm of the crowd. I don’t like it any more than you but – that’s the state of the world we’re in. Again, I was answering the OP’s question as honestly and objectively as I could – that’s why he got booted. I don’t necessarily think it’s right, I don’t really think much of it at all. I frankly couldn’t care less who the CEO of Mozilla is.

            My intention was to state my understanding of why he got ousted, not to lay judgement on the society which ousted him.

            1. 3

              Understood. I’m responding to the mentality behind the words I quoted, not necessarily you. I find internet justice very distasteful, even when I agree with the results.

              1. 4

                Off-topic: I like lobste.rs – on reddit, this would have been a much longer, and much less polite, interchange.

                On-topic: I find it pretty difficult to separate myself from how heartily I disagree with Eich. I also dislike the common mob-mentality, but at the same time it occasionally mobs in my general leftward direction, and it’s hard not to feel justified in hatred. I strongly dislike this, it’s perpetrating the same underlying problem – that people base their choices not on facts, but on beliefs and opinions. This happens in a wide variety of controversies in the tech world, and between it and the widespread false-difference fallacy everyone seems to love so much[1], it only ever ends up in a lot of rabble-rabble and egg on everyone’s face; and usually no substantive change to actually fix the problems that lead to the controversy.

                [1] As a note, it is possible to treat someone with honest empathy, but also doubt the veracity and magnitude of their claim – but this is a can of worms for another day.

          2. 4

            how is the expectation that public and private life be separate “privileged”? do you know of one “ordinary person” who supported prop 8 and lost his job as a consequence?

            it was an ugly mob. pseudo-intellectual excuses don;t make it any prettier.

            1. 20

              here’s where the symmetry breaks down - you do not need to even be aware of prop 8 for your life to be affected by it. it is predicated on the idea that people in same-sex relationships should be legally treated as lesser than people in opposite-sex ones, for no better reason than that it’s the current status quo.

              on the other hand, the proposition literally does not affect eich’s life in any way. there is nothing he can do that he would be unable to do once same sex marriage was legalised, nothing that would be taken away from him, nothing that would even affect him other than the distressing knowledge that someone, somewhere had been granted equal rights. and yet, he spent $1000 so that people fighting against gay marriage would have a better chance of getting their way. i don’t think that actively working towards something that makes no difference to him but that negatively impacts other people really counts as “private life”.

              1. 4

                Very well explained. Couldn’t agree more.

              2. 2

                I was merely summarizing the views that led up to him stepping down / being forced out.

                That said, I don’t like the guy for a lot of reasons. “Inventor of Javascript” isn’t a resume entry I hold in particularly high esteem. I don’t agree with his personal views and – were I a stakeholder in the company, I probably would’ve been upset and vocal about promoting someone with said views. But since I’m not, I didn’t.

                To more directly answer your question (again, summarizing the community of people who were angry about his personal views) – the idea of ‘privilege’ might well be defined as ‘a double standard held against a class of people’. That is – the double standard they perceived (especially after his interview) was that for them to question his personal views/beliefs was out-of-scope, but for him to question theirs was fine. I’m not sure if I totally agree with the application in this case, but I can see where they’re coming from.

                Ultimately, I was merely answering the question – these are the facts-in-evidence as to why he ultimately stepped down/was forced out. Whether or not you agree is up to you.

            2. 3

              Minor point, he didn’t get hired by Mozilla, he founded Mozilla.

              1. 1

                he didn’t lie to pacify the mob. apparently that’s what you have to do. because, apparently, we value tolerance so much we can’t tolerate someone whose personal views we don’t agree with.

                1. 0

                  A very large amount of bad PR outside of mozilla and negative sentiment within mozilla caused this with resigning board members and others. It’s very unfortunate, since if it was an obvious protected class thing such as being mormon or similar, he wouldn’t be experiencing this.

                  Imagine this headline: New CEO of large company in Utah steps down because of negative backlash of not being Mormon.

                  1. 5

                    This is a ridiculous false equivalence. How is being a homophobic bigot similar in any way similar to being an LDS?

                  2. 1

                    It’s a bit more complicated than I make it sound but Brendan was really more of a co-founder of Mozilla alongside Mitchell Baker. Eich was the technical lead, Mitchell handled the administrative and legal side of things.

                  1. 7

                    By far the biggest problem with Keybase.io is the suggestion to upload your private keys to their service. This completely breaks security. I like the ability to easily verify via other channels like Twitter and Github; GPG supports varying trust levels so you could trust a key .

                    I suppose the target audience for this service is technical people who are (excusably) put off by the complexity of gpg --help. Ultimately, I hope Keybase helps the existing GPG system rather than attempting to create a silo.

                    1. 2

                      the suggestion to upload your private keys to their service.

                      Not having received my invite yet, I hadn’t realized that was a requirement. That’s not very comforting.

                      1. 6

                        It’s not a requirement: you can do everything using their command line client, which is open source and doesn’t require uploading private keys. Private key hosting is a convenience thing for using their webapp to sign things.

                        I wish they wouldn’t even make private key signing possible, but it isn’t a hard dependency.

                      2. 2
                        1. 3

                          That response is quite concerning – that sort of security/convenience argument is not a strong one, and further it encourages an insecure default to new users of cryptography; which is precisely the sort of user keybase is trying to attract.

                          In particular, no matter how well encrypted your key, it is possible that an attacker breaks in, downloads all those keys, and attacks them in-bulk using standard attacks against a large keybase. It’s a massive security hazard and no amount of convenience can justify it.

                        2. 1

                          That suggestion is part of what makes me suspicious of the entire system. I can’t see how any well meaning, moderately competent security person would suggest such a thing.

                          Building a new centralized directory, because “PKI is hard” makes me think that “building a silo” is exactly what they’re trying to do.

                        1. 5

                          This is remarkable. I came across your site a while back when you wrote In defense of canvas (recommended reading for others browsing the thread). I still am impressed with the performance of this site.

                          I’m curious: is there an underlying framework you use to handle UI controls and events?

                          1. 5

                            Thanks! Nope, we are using zero underlying frameworks for UI or JavaScript. Even jQuery is too slow for our purposes. Everything is our own. :-)

                          1. 3

                            Following much criticism, MongoHQ pulled the original article on 2014/03/16 and rewrote it as the following: http://blog.mongohq.com/how-we-scale-mongodb/

                            1. 1

                              That would explain the 404. It would have been nice of them to keep the original up and linked to the updated piece.

                              1. 2
                            1. 5

                              I cringed a bit when I saw this on the project page:

                              Class definitions closely resemble the familiar syntax of languages like Java and PHP

                              Why do people continue to try and shoehorn ‘classical’ inheritance into javascript? The implementation is almost always ugly. Why not just embrace the prototypical inheritance the language comes with?

                              1. 2

                                umm, and by ‘prototypical,’ I of course mean ‘prototypal’

                                1. 1

                                  Why not just embrace the prototypical inheritance the language comes with?

                                  I lean in this direction too, but I can’t lie… I am really intrigued by this project.

                                  Frameworks that adopt “classical” concepts have always left all the good stuff out. By that I mean abstraction, interfaces, finality, statics, constants, etc. This seems to be filling that gap better than my expectations lead me to believe. An optional new on constructors is pretty nice, too (however I believe it can enable bad habits).

                                1. 1

                                  I’m a little unclear on how this works. Is the code in the repo both a client and a server? I’m assuming that all nodes will need to run an instance and somehow they get wired up through the web interface. Is that right?

                                  1. 1

                                    Seems like it’s server and client. I had to add each node to each other node to get it to sync files.

                                  1. 1

                                    On of my clients (and as a result, me) recently suffered a DDoS attack last Monday. I’m not sure if the events are related, but it is interesting to see none the less.

                                    Ultimately I recommended using CloudFlare as there doesn’t seem to be a whole lot that can be done to protect defend attacks like this. I’m not sure if it has helped, but it did come highly recommended from everyone I asked.

                                    1. 8

                                      I wish this fad of using ANSI color for everything would die off. You have no idea what the user’s terminal looks like and when you start printing bright green text on a terminal that has a light background, it’s completely unreadable.

                                      Some days I have an urge to submit pull requests to every project that does this to honor some environment variable I can set to disable colors by default.

                                      1. 3

                                        I don’t think it’s likely to die off, but I can see a push toward enabling some sort of “NO_COLOR” environment variable gaining some traction. I don’t write many CLI’s, and have never considered the problem (since I use a fairly typical colorscheme in my terminal), but will definitely remember the NO_COLOR option for the future.

                                        1. 4

                                          One piece of feedback we’ve received is that people want us to honour $TERM and terminfo, so that $TERM=basic will suppress colour output and similar. We’re looking at implementing this so that we can cater to this.

                                          In the general case, well designed colour schemes for terminals should be able to work well with escaped colours. Colours are a pretty key part of providing quickly visually parseable output in my experience.

                                        2. 2

                                          What terminal do you use? Could you perhaps turn up the contrast or simply disable ANSI colors?

                                          1. 1

                                            You can always pipe it through something that strips ANSI, e.g. http://unix.stackexchange.com/questions/4527/program-that-passes-stdin-to-stdout-with-color-codes-stripped

                                            (The top answer strips all codes, but there are ones further down that claim to only strip colour codes.)

                                            1. 3

                                              Of course, and I could always just not use programs that vomit colors all over my terminal, too.

                                          1. 1

                                            I get a lot of mileage from my git-deploy script. It’s pretty simple, just force-pushes the current HEAD onto a given remote.

                                            #!/bin/bash
                                            git push $1 +HEAD:master
                                            git fetch $1
                                            git push origin --tags
                                            

                                            This assumes you use git for deployments. You’ll take some serious heat from your fellow developers if you used this on a remote that isn’t a “functional” repository (I classify most repos as archival, deployments as functional).

                                            The latter two lines fetch the history of the remote and push any auto-generated deployment tags with the origin.This useful when git log --decorateing to see what is live compared to what is in dev.

                                            1. 3

                                              This is interesting. I use tmux constantly, but I can’t say I have ever tried to use X-forward anything with it.

                                              I’m not too familiar with the concepts here so after a bit of searching it was pretty easy to see how this all is wired up together. What’s particularly interesting is preexec(). I always wondered if that was possible.