<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>FettesPS &#187; unix</title>
	<atom:link href="http://www.fettesps.com/tag/unix/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.fettesps.com</link>
	<description>Fettes Programming Solutions</description>
	<lastBuildDate>Sun, 22 Jan 2012 18:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Creating a New User</title>
		<link>http://www.fettesps.com/unix-creating-a-new-user/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=unix-creating-a-new-user</link>
		<comments>http://www.fettesps.com/unix-creating-a-new-user/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 02:50:18 +0000</pubDate>
		<dc:creator>FettesPS</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[adduser]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[man adduser]]></category>
		<category><![CDATA[man useradd]]></category>
		<category><![CDATA[mandrake]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[redhat]]></category>
		<category><![CDATA[sh]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[useradd]]></category>

		<guid isPermaLink="false">http://www.fettesps.com/?p=339</guid>
		<description><![CDATA[Creating a user in Linux is a simple task. Well, kinda. You can quickly create a user without specifying much of it&#8217;s characteristics, or you can get much more in depth with security, default shells and other customizations. I recommend taking the time to learn beyond the basics or you may find yourself making a [...]]]></description>
			<content:encoded><![CDATA[<p>Creating a user in Linux is a simple task. Well, kinda.  You can quickly create a user without specifying much of it&#8217;s characteristics, or you can get much more in depth with security, default shells and other customizations.  I recommend taking the time to learn beyond the basics or you may find yourself making a simple mistake. For the longest time I created my user&#8217;s with a command like this:</p>
<pre class="brush: bash; title: ; notranslate">sudo useradd -d /home/username -m username
sudo passwd username</pre>
<p>I had thought for a long time this was sufficient.  It created their home directory with the <em>-m</em> parameter and specified that location with the <em>-d</em> parameter.  After that I set the password and the user was now able to login to the system with basic privileges. But after a while I began to notice some quirks with those users.  They didn&#8217;t act like the initial admin user that was created by the installation process.  I found that the prompt was a bit less informative.  It also lacked a history, and the ability to hit tab to complete a directory as you typed it.  I even found myself copying over the root .bashrc and trying to figure out what ws different between the users.  Then I typed in the following command just to make sure it was using bash:</p>
<pre class="brush: bash; title: ; notranslate">echo $SHELL</pre>
<p>I looked at the response.</p>
<pre class="brush: bash; title: ; notranslate">/bin/sh</pre>
<p>*face-palm*</p>
<p>No wonder .bashrc didn&#8217;t do anything, I was using a completely different shell for my subsequent users.  I had never taken the time to learn the difference between the various shells, most systems use bash by default so that is what I learned and got used to.  So I never even realized they were using sh instead of bash. </p>
<p>To quickly change the shell for an established user to bash just run the command:</p>
<pre class="brush: bash; title: ; notranslate">chsh -s /bin/bash username</pre>
<p>Since then I&#8217;ve adjusted my create user command to include bash as my default shell.</p>
<pre class="brush: bash; title: ; notranslate">sudo useradd -d /home/username -m username -s /bin/bash</pre>
<p>There are many more parameters that you can add on to this command. If you&#8217;d like to read up on those then just type <em>man useradd</em> and read through the documentation.  Or if you want a very verbose and easy to use command to create your users you can always try <em>adduser</em>.  Instead of passing in which parameters you want to specify it will prompt you on every possibility.  Great for if you don&#8217;t know which options exist, but also somewhat overwhelming in the beginning.</p>
<pre class="brush: bash; title: ; notranslate">mradmin@microsoft$ sudo adduser username
Password: ******
Adding user `username’…
Adding new group `username’ (1337).
Adding new user `username’ (1337) with group `username’.
Creating home directory `/home/username’.
Copying files from `/etc/skel’
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for username
Enter the new value, or press ENTER for the default
Full Name []: Example User
Room Number []: 0
Work Phone []: 604-6122
Home Phone []: 604-6222
Other []:
Is the information correct? [y/N] </pre>
<p>The choice of which two methods to use is a mater of preference.  In the long run, what matters is that you educate yourself on what all of the available options do.  And remember, <em>man useradd</em> and <em>man adduser</em> are your friends!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fettesps.com/unix-creating-a-new-user/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>phpMyAdmin Installation on Ubuntu Server 8.04</title>
		<link>http://www.fettesps.com/phpmyadmin-installation-on-ubuntu-server-804/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=phpmyadmin-installation-on-ubuntu-server-804</link>
		<comments>http://www.fettesps.com/phpmyadmin-installation-on-ubuntu-server-804/#comments</comments>
		<pubDate>Tue, 27 Jan 2009 05:01:20 +0000</pubDate>
		<dc:creator>FettesPS</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[ubuntu 8.10]]></category>
		<category><![CDATA[ubuntu 9.04]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.fettesps.com/?p=8</guid>
		<description><![CDATA[Since managing a MySQL database through a command line is tedious we will be installing a web-based GUI so we can access MySQL through any web browser on any computer. On many Unix machines you&#8217;d have to go to the phpMyAdmin homepage and download the files there, decompress them and set up a config files [...]]]></description>
			<content:encoded><![CDATA[<p>Since managing a MySQL database through a command line is tedious we will be installing a web-based GUI so we can access MySQL through any web browser on any computer.</p>
<p>On many Unix machines you&#8217;d have to go to the phpMyAdmin homepage and download the files there, decompress them and set up a config files before you could get to managing your database.&nbsp; If you&#8217;re setting up several machines to work in a cluster you have better things to do with your time. This is why I love Debian/Ubuntu distrobutions.</p>
<pre class="brush: bash; title: ; notranslate">apt-get install phpmyadmin</pre>
<p>During the install process you will be asked which version of Apache you are running.&nbsp; Ubuntu Server Edition uses Apache 2.2, so it wont be automatically configured for you.&nbsp; After the install process completes you will need to configure Apache 2.2, so in your favourite text editor open up  <span class="system"><span style="font-style: italic;">/etc/apache2/apache2.conf</span> and search for the word include.&nbsp; Add a new line next to its first match like this:</p>
<p></span> </p>
<pre class="brush: bash; title: ; notranslate">Include /etc/phpmyadmin/apache.conf</pre>
<p>Save the file, exit to your command line and restart Apache with the following command:</p>
<pre class="brush: bash; title: ; notranslate">/etc/init.d/apache2 restart</pre>
<p>Your phpMyAdmin installation is now ready to use. Point your browser to <span style="font-style: italic;">http://domain/phpmyadmin/</span> and log in with your mySQL username and password.&nbsp; It&#8217;s that simple!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.fettesps.com/phpmyadmin-installation-on-ubuntu-server-804/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

