

Using Chef to automate setting up a Rails Server (including sample code) - talkingquickly
http://www.talkingquickly.co.uk/2013/09/using-chef-to-provision-a-rails-and-postgres-server/

======
bradleyland
This is a total side-topic question, but I've always been unsure about this
usage of openssl to generate passwords:

    
    
          // generate this with: openssl passwd -1 "plaintextpassword"
    

I'm assuming that there is an implicit presumption that the person executing
this snippet will replace the string literal with their own plain text
password, but I suspect a lot of new users will simply run that command.
Because this is being used as a user password, which will then be hashed again
by the OS, is there any security concern here? I'm just not knowledgable
enough to know for sure, but it seems like the kind of thing that warrants
questioning.

I tend to use `openssl rand` to generate passwords so that I avoid having to
create any input myself.

    
    
        openssl rand -base64 24
    

If I need some password length that results in '=' padding, I just use cut:

    
    
        openssl rand -base64 41 | cut -c1-41
    

I've seen this suggested in a lot of places, but likewise, I lack the required
knowledge to say if this is any better.

