<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Snipplr</title>
    <description>Recent snippets posted on Snipplr.com</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Tue, 09 Jun 2026 16:09:00 +0000</lastBuildDate>
    <item>
      <title>(Bash) Create Linux User with Geneated Password and MySQL User - jiewmeng</title>
      <link>https://snipplr.com/view/61292/create-linux-user-with-geneated-password-and-mysql-user</link>
      <description>&lt;p&gt;**Usage**&#13;
&#13;
    &gt; newuser.bash [username]&#13;
&#13;
**What it does**&#13;
&#13;
- Generates a random password with `makepasswd`&#13;
- Encrypts it with `mkpasswd` for use with useradd&#13;
- Adds the user&#13;
- Adds a MySQL Database for user&#13;
- Adds a MySQL User for user&#13;
- Grants all privileges to user to his/her database&#13;
&#13;
**Sample Output**&#13;
&#13;
    km@KM-VBox:~$ ./newuser.bash test1&#13;
    Creating user: test1&#13;
    Password: zV8MDMRh&#13;
    [sudo] password for km: &#13;
    Creating mysql user &amp; database for test1&#13;
&#13;
&#13;
[Short demo on Screenr (1min)](http://screenr.com/ghzs)&lt;/p&gt;</description>
      <pubDate>Tue, 29 Nov 2011 13:41:39 UTC</pubDate>
      <guid>https://snipplr.com/view/61292/create-linux-user-with-geneated-password-and-mysql-user</guid>
    </item>
  </channel>
</rss>
