TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Using Chef to automate setting up a Rails Server (including sample code)

8 点作者 talkingquickly超过 11 年前

1 comment

bradleyland超过 11 年前
This is a total side-topic question, but I&#x27;ve always been unsure about this usage of openssl to generate passwords:<p><pre><code> &#x2F;&#x2F; generate this with: openssl passwd -1 &quot;plaintextpassword&quot; </code></pre> I&#x27;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&#x27;m just not knowledgable enough to know for sure, but it seems like the kind of thing that warrants questioning.<p>I tend to use `openssl rand` to generate passwords so that I avoid having to create any input myself.<p><pre><code> openssl rand -base64 24 </code></pre> If I need some password length that results in &#x27;=&#x27; padding, I just use cut:<p><pre><code> openssl rand -base64 41 | cut -c1-41 </code></pre> I&#x27;ve seen this suggested in a lot of places, but likewise, I lack the required knowledge to say if this is any better.