<?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>How To Do Everything &#124; How To Tutorials &#187; Unix Terminal</title>
	<atom:link href="http://howtoideas.net/category/computer-and-programming/linux-unix/unix-terminal/feed" rel="self" type="application/rss+xml" />
	<link>http://howtoideas.net</link>
	<description>How To Ideas</description>
	<lastBuildDate>Wed, 25 Apr 2012 21:22:25 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>The who command &#8211; Terminal</title>
		<link>http://howtoideas.net/the-who-command-terminal</link>
		<comments>http://howtoideas.net/the-who-command-terminal#comments</comments>
		<pubDate>Tue, 20 Dec 2011 22:24:25 +0000</pubDate>
		<dc:creator>Rohit</dc:creator>
				<category><![CDATA[Unix Terminal]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[Unix]]></category>
		<category><![CDATA[user information]]></category>
		<category><![CDATA[who]]></category>
		<category><![CDATA[who command]]></category>

		<guid isPermaLink="false">http://howtoideas.net/?p=3002</guid>
		<description><![CDATA[who is command or tool in Unix/Linux-based operating systems which enables the user to know who is currently logged in their system i.e who is on the System. If no option is supplied to this command, it will display the names of users currently logged in the system, along with their terminal, the time of login and the host from which they have logged in. *** Note all the following... <span class="meta-more"><a href="http://howtoideas.net/the-who-command-terminal">Read more &#187;</a></span>]]></description>
				<content:encoded><![CDATA[<p><code>who</code> is command or tool in Unix/Linux-based operating systems which enables the user to know who is currently logged in their system i.e who is on the System. If no option is supplied to this command, it will display the names of users currently logged in the system, along with their terminal, the time of login and the host from which they have logged in.</p>
<p><em>*** Note all the following information is tested on Ubuntu 11.10. We endeavor to keep the information up-to-date and correct, However, we cannot guarantee that information given on the site is accurate or up to date</em>.</p>
<p><strong>Syntax </strong> :  <strong>who </strong><em>[options] [file]</em></p>
<p>Here <em>file</em> specify a path name of a file which can be supplied to give additional information. Default one is <em>/etc/utmp</em>.</p>
<p><strong>General Output format :</strong> name [state] line time [idle] [pid] [comment]<em></em></p>
<blockquote>
<ul>
<li><em>name</em> is user&#8217;s login name</li>
<li><em>state</em> shows the user&#8217;s capability of writing to the terminal</li>
<li><em>line</em> is name of the line found in <em>/dev</em></li>
<li><em>time</em> is time since user&#8217;s login</li>
<li><em>idle</em> is time elapsed since the user&#8217;s last activity and . for this means currently the user is using the system i.e not idle</li>
<li><em>pid</em> is user&#8217;s process id</li>
<li><em>comment</em> comment line in inittab.</li>
</ul>
</blockquote>
<p>Following table shows all the available <em>Options</em> which you can use with <code>who</code> command/tool.</p>
<table width="100%" cellspacing="0" cellpadding="4">
<colgroup>
<col width="128*" />
<col width="128*" /></colgroup>
<tbody>
<tr valign="TOP">
<td style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: #000000 -moz-use-text-color #000000 #000000; padding: 0.04in 0in 0.04in 0.04in;" width="50%"><span style="text-decoration: underline;"><strong>Option Available</strong></span></td>
<td style="border: 1px solid #000000; padding: 0.04in;" width="50%"><span style="text-decoration: underline;"><strong>Working</strong></span></td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-a, &#8211;all</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Equivalent to <strong>-b</strong> <strong>-d</strong> <strong>&#8211;login</strong> <strong>-p</strong> <strong>-r</strong> <strong>-t</strong> <strong>-T</strong> <strong>-u</strong>.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">am i</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print the name of invoking user only i.e current terminal.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-b, &#8211;boot</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print the date and time of last system boot.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-d, &#8211;dead</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print the list of dead processes.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-H</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print column headings above the regular output.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-l, &#8211;login</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Prints list of only those lines on which the system is waiting for someone to login i.e of system login processes.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-m</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Same as <em><strong>who am i</strong></em>.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-p, &#8211;process</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print the list of currently active processes spawned by Init.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-q, &#8211;count</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print only the user names currently logged in and total number of users currently logged in.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-r, &#8211;runlevel</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print the current runlevel of Init process.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-s, &#8211;short</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print only name, line, and time. Which is the default behaviour</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-t, &#8211;time</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print the last system clock change.</td>
</tr>
<tr valign="TOP">
<td style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color #000000 #000000; padding: 0in 0in 0.04in 0.04in;" width="50%">-u, &#8211;users</td>
<td style="border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color #000000 #000000; padding: 0in 0.04in 0.04in;" width="50%">Print the list of currently logged in users.</td>
</tr>
</tbody>
</table>
<p>Here are some of the working examples of this command:</p>
<ol>
<li><strong><code>who -m</code> command</strong><br />
This command displays information of invoking user only. Following image illustrates this.</p>
<p><div id="attachment_3006" class="wp-caption aligncenter" style="width: 512px"><a href="http://howtoideas.net/the-who-command-terminal/who-m-command" rel="attachment wp-att-3006"><img class="size-full wp-image-3006" title="who -m command" src="http://howtoideas.net/wp-content/uploads/2011/12/who-m-command.png" alt="who -m command" width="502" height="205" /></a><p class="wp-caption-text">who -m command</p></div></li>
<li><strong><code>who -q</code> command</strong><br />
This command displays the user names currently logged in and total number of users currently logged in. In the following image, this command was run in the left terminal when other terminal was not open and in the other terminal when I logged in using other user id, it displays information about two users.</p>
<p><div id="attachment_3008" class="wp-caption aligncenter" style="width: 664px"><a href="http://howtoideas.net/the-who-command-terminal/who-q-command" rel="attachment wp-att-3008"><img class=" wp-image-3008 " title="who -q command" src="http://howtoideas.net/wp-content/uploads/2011/12/who-q-command.png" alt="who -q command" width="654" height="253" /></a><p class="wp-caption-text">who -q command</p></div></li>
</ol>
<p>Some other images of showing working of this command.</p>
<div id="attachment_3004" class="wp-caption aligncenter" style="width: 405px"><a href="http://howtoideas.net/the-who-command-terminal/who-command" rel="attachment wp-att-3004"><img class="size-full wp-image-3004" title="who command" src="http://howtoideas.net/wp-content/uploads/2011/12/who-command.png" alt="who command" width="395" height="105" /></a><p class="wp-caption-text">who command</p></div>
<div id="attachment_3003" class="wp-caption aligncenter" style="width: 367px"><a href="http://howtoideas.net/the-who-command-terminal/who-b-command" rel="attachment wp-att-3003"><img class="size-full wp-image-3003" title="who -b command" src="http://howtoideas.net/wp-content/uploads/2011/12/who-b-command.png" alt="who -b command" width="357" height="114" /></a><p class="wp-caption-text">who -b command</p></div>
<div id="attachment_3005" class="wp-caption aligncenter" style="width: 652px"><a href="http://howtoideas.net/the-who-command-terminal/who-h-command" rel="attachment wp-att-3005"><img class=" wp-image-3005 " title="who -H command" src="http://howtoideas.net/wp-content/uploads/2011/12/who-H-command.png" alt="who -H command" width="642" height="157" /></a><p class="wp-caption-text">who -H command</p></div>
<div id="attachment_3007" class="wp-caption aligncenter" style="width: 527px"><a href="http://howtoideas.net/the-who-command-terminal/who-p-command" rel="attachment wp-att-3007"><img class="size-full wp-image-3007" title="who -p command" src="http://howtoideas.net/wp-content/uploads/2011/12/who-p-command.png" alt="who -p command" width="517" height="131" /></a><p class="wp-caption-text">who -p command</p></div>
]]></content:encoded>
			<wfw:commentRss>http://howtoideas.net/the-who-command-terminal/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The passwd Command &#8211; Terminal</title>
		<link>http://howtoideas.net/the-passwd-command-terminal</link>
		<comments>http://howtoideas.net/the-passwd-command-terminal#comments</comments>
		<pubDate>Fri, 16 Dec 2011 22:19:36 +0000</pubDate>
		<dc:creator>Rohit</dc:creator>
				<category><![CDATA[Unix Terminal]]></category>
		<category><![CDATA[change password]]></category>
		<category><![CDATA[delete password]]></category>
		<category><![CDATA[expire password]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[lock password]]></category>
		<category><![CDATA[passwd]]></category>
		<category><![CDATA[passwd example]]></category>
		<category><![CDATA[passwd file]]></category>
		<category><![CDATA[passwd man]]></category>
		<category><![CDATA[password status]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[terminal commands]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://howtoideas.net/?p=2956</guid>
		<description><![CDATA[passwd is command or tool in Unix/Linux-based operating systems which enables the user to change or configure Password of a User account. The password entered by user is run through a Key Derivation Function which converts the plain text to equivalent hash which is encrypted one. Original password is not saved anywhere for security reasons, only this hashed version of new password is stored in /etc/passwd file. Hashed version of... <span class="meta-more"><a href="http://howtoideas.net/the-passwd-command-terminal">Read more &#187;</a></span>]]></description>
				<content:encoded><![CDATA[<p><code>passwd</code> is command or tool in Unix/Linux-based operating systems which enables the user to change or configure <strong>Password </strong>of a User account. The password entered by user is run through a <a href="http://en.wikipedia.org/wiki/Key_derivation_function" target="_blank">Key Derivation Function</a> which converts the plain text to equivalent hash which is encrypted one. Original password is not saved anywhere for security reasons, only this hashed version of new password is stored in <em>/etc/passwd</em> file. Hashed version of plain text is usually calculated by using <a href="http://en.wikipedia.org/wiki/Data_Encryption_Standard" target="_blank">DES</a> algorithm.</p>
<p><em>*** <span style="text-decoration: underline;">Note all the following information is tested on Ubuntu 11.10. We endeavor to keep the information up-to-date and correct, However, we cannot guarantee that information given on the site is accurate or up to date</span></em><span style="text-decoration: underline;">.</span></p>
<p><span style="text-decoration: underline;"><strong>Syntax </strong></span> : <strong>passwd</strong> <em>[<span style="text-decoration: underline;">options</span>] [<span style="text-decoration: underline;">LOGIN</span>]</em></p>
<p>Here <em>LOGIN</em> is the user-id whose password you want to change. If you want to change password of current user account, then there is no need to mention you user-id, but if you want to change password information of another user&#8217;s account, then you have to mention user-id.</p>
<p>Following table shows all the available <em>Options</em> which you can use to configure password of a user account with <code>passwd</code> command/tool.</p>
<table width="100%" border="1" cellspacing="5" cellpadding="5">
<colgroup>
<col width="128*" />
<col width="128*" /> </colgroup>
<tbody>
<tr valign="TOP">
<td width="50%">
<p align="LEFT"><span style="text-decoration: underline;"><strong>Option Available</strong></span></p>
</td>
<td width="50%">
<p align="LEFT"><span style="text-decoration: underline;"><strong>Working</strong></span></p>
</td>
</tr>
<tr valign="TOP">
<td width="50%">
<p align="LEFT">-a, &#8211;all</p>
</td>
<td width="50%">
<p align="LEFT">report password status on all accounts</p>
<p align="LEFT">can be used with -S option only</p>
</td>
</tr>
<tr valign="TOP">
<td width="50%">
<p align="LEFT">-d, &#8211;delete</p>
</td>
<td width="50%">
<p align="LEFT">delete the password for the named account</p>
</td>
</tr>
<tr valign="TOP">
<td width="50%">
<p align="LEFT">-e, &#8211;expire</p>
</td>
<td width="50%">
<p align="LEFT">force expire the password for the named account</p>
</td>
</tr>
<tr valign="TOP">
<td width="50%">
<p align="LEFT">-r, &#8211;repository REPOSITORY</p>
</td>
<td width="50%">
<p align="LEFT">change password in REPOSITORY repository</p>
<p align="LEFT">Available Repositories : files, nis or nisplus.</p>
</td>
</tr>
<tr valign="TOP">
<td width="50%">
<p align="LEFT">-l, &#8211;lock</p>
</td>
<td width="50%">
<p align="LEFT">lock the password of the named account</p>
</td>
</tr>
<tr valign="TOP">
<td width="50%">
<p align="LEFT">-S, &#8211;status</p>
</td>
<td width="50%">
<p align="LEFT">report password status on the named account</p>
</td>
</tr>
</tbody>
</table>
<p>Here are some of the working examples of this command</p>
<ol>
<li><strong>Changing the password of current account without using any option</strong><br />
For this you can refer to another article which can be found <a href="http://howtoideas.net/how-to-change-user-account-password-using-terminal" target="_blank" class="broken_link">here</a>.</li>
<li><strong>Changing the password of current account without using any option</strong><br />
Type in the following command to change password for another user&#8217;s account. For this you must have Super User rights, otherwise it will show an error <strong>&#8220;You may not view or modify password information for [user-id]&#8220;</strong>. In the following example, I am changing password of the User account with user-id <em>howtoideas</em>.</p>
<blockquote><p><code>sudo passwd howtoideas</code></p></blockquote>
<p>It will ask you the password of the current account to use <code>sudo</code> command and then it will ask you to enter new password of the other user account twice, and then it will show you an output message as shown in following image.</p>
<p><div id="attachment_2963" class="wp-caption aligncenter" style="width: 655px"><a href="http://howtoideas.net/the-passwd-command-terminal/password-another-account" rel="attachment wp-att-2963"><img class=" wp-image-2963" title="Change Password of another account" src="http://howtoideas.net/wp-content/uploads/2011/12/password-another-account.png" alt="Change Password of another account" width="645" height="190" /></a><p class="wp-caption-text">Change Password of another account</p></div></li>
<li><strong>Deleting password using <code>-d</code> option</strong><br />
Next time your Operating System will not ask for a password to log into this account. In the following example I am changing the deleting the password of howtoideas user account. If you want to delete password of your own account, then there is no need to add user-id at the end of command.</p>
<blockquote><p><code>sudo passwd -d howtoideas</code></p></blockquote>
<p>Here is an image of the tested command.</p>
<p><div id="attachment_2962" class="wp-caption aligncenter" style="width: 444px"><a href="http://howtoideas.net/the-passwd-command-terminal/password-delete" rel="attachment wp-att-2962"><img class="size-full wp-image-2962" title="Delete Password" src="http://howtoideas.net/wp-content/uploads/2011/12/Password-delete.png" alt="Delete Password" width="434" height="109" /></a><p class="wp-caption-text">Delete Password</p></div></li>
<li><strong>Forcefully expires the password of a user account using <code>-e</code> option<br />
</strong>This will expire the current password of the user account and next time when this user tries to log into his account, System will ask the user to enter new password as enforced by root. Following command will expire the password of <em>howtoideas</em>user account.</p>
<blockquote><p><code>sudo passwd -e howtoideas</code></p></blockquote>
<p>Following image shows the working of this command.</p>
<div id="attachment_2961" class="wp-caption aligncenter" style="width: 459px"><a href="http://howtoideas.net/the-passwd-command-terminal/password-expiration" rel="attachment wp-att-2961"><img class="size-full wp-image-2961" title="Password Expiration Information Change" src="http://howtoideas.net/wp-content/uploads/2011/12/Password-Expiration.png" alt="Password Expiration Information Change" width="449" height="119" /></a><p class="wp-caption-text">Change Password Expiration Information</p></div>
<p>In following image, I am trying to log into <em>howtoideas</em> account, and see Terminal is asking to change the current password as enforced by root.</p>
<p><div id="attachment_2967" class="wp-caption aligncenter" style="width: 635px"><a href="http://howtoideas.net/the-passwd-command-terminal/change-password-root-enforced" rel="attachment wp-att-2967"><img class="size-full wp-image-2967" title="Change password root enforced" src="http://howtoideas.net/wp-content/uploads/2011/12/Change-password-root-enforced.png" alt="Change password root enforced" width="625" height="375" /></a><p class="wp-caption-text">Change password root enforced</p></div></li>
<li><strong>Lock account password using <code>-l</code> option<br />
</strong>This option will lock the user account password and user will not be able to log into his account even after providing correct information. In the following command I am locking the <em>howtoideas</em>user account password.</p>
<blockquote><p><code>sudo passwd -l howtoideas</code></p></blockquote>
<p>Following image shows the output of upper command.</p>
<div id="attachment_2964" class="wp-caption aligncenter" style="width: 448px"><a href="http://howtoideas.net/the-passwd-command-terminal/lock-user-account-password" rel="attachment wp-att-2964"><img class="size-full wp-image-2964" title="lock user account password" src="http://howtoideas.net/wp-content/uploads/2011/12/lock-user-account-password.png" alt="lock user account password" width="438" height="123" /></a><p class="wp-caption-text">lock user account password</p></div>
<p>Now if i try to log into <em>howtoideas</em> account, I won&#8217;t be able to do so, even after providing correct password as shown in the following image.</p>
<p><div id="attachment_2965" class="wp-caption aligncenter" style="width: 453px"><a href="http://howtoideas.net/the-passwd-command-terminal/locked-password" rel="attachment wp-att-2965"><img class="size-full wp-image-2965" title="Locked Password" src="http://howtoideas.net/wp-content/uploads/2011/12/Locked-Password.png" alt="Locked Password" width="443" height="186" /></a><p class="wp-caption-text">Locked Account Password</p></div></li>
<li><strong>Checking status of a particular account or all the accounts using <code>-S</code> option</strong><br />
This option will show the status information of a user account. The information shown is in the following order</p>
<blockquote><p>name status mm/dd/yy min max warn</p></blockquote>
<table border="1" cellspacing="5" cellpadding="5">
<tbody>
<tr>
<td valign="top">name</td>
<td valign="top">The login ID of the user.</td>
</tr>
<tr>
<td valign="top">status</td>
<td valign="top">Status of the name:<br />
PS or P = Password Enabled account<br />
LK or L = Locked<br />
NP = No Password<br />
NL = No login account</td>
</tr>
<tr>
<td valign="top">mm/dd/yy</td>
<td valign="top">The month date and year that the password was last changed.</td>
</tr>
<tr>
<td valign="top">min</td>
<td valign="top">The minimum number of days between password changes.</td>
</tr>
<tr>
<td valign="top">max</td>
<td valign="top">The maximum number of days the password is valid for the name.</td>
</tr>
<tr>
<td valign="top">warn</td>
<td valign="top">The number of days relative to max before the passwd uses pam for password management.</td>
</tr>
</tbody>
</table>
<p>Following command will showing the information of <em>howtoideas</em> account.</p>
<blockquote><p><code>sudo passwd -S howtoideas</code></p></blockquote>
<p>Following image shows the output of upper command. See the <em>L</em> character in image after <em>howtoideas</em> in the output which shows that the account is locked. This is because in previous point I locked this account for example purpose.<br />
<strong></strong></p>
<div id="attachment_2966" class="wp-caption aligncenter" style="width: 452px"><a href="http://howtoideas.net/the-passwd-command-terminal/locked-account" rel="attachment wp-att-2966"><img class=" wp-image-2966" title="Locked account Information" src="http://howtoideas.net/wp-content/uploads/2011/12/Locked-account.png" alt="Locked account Information" width="442" height="103" /></a><p class="wp-caption-text">Locked account Information</p></div>
<p><strong><br />
</strong></li>
<li><strong>Checking status of a particular account or all the accounts using <code>-S</code> and <code>-a </code></strong>Following command will output the password status information of all the account present in the system.<br />
<blockquote><p><code>sudo passwd -S -a</code></p></blockquote>
<p>Following image shows the output of upper command<br />
<strong></strong></p>
<p><div id="attachment_2960" class="wp-caption aligncenter" style="width: 460px"><a href="http://howtoideas.net/the-passwd-command-terminal/password-status-of-all-accounts" rel="attachment wp-att-2960"><img class="size-full wp-image-2960" title="Password status of all accounts" src="http://howtoideas.net/wp-content/uploads/2011/12/Password-status-of-all-accounts.png" alt="Password status of all accounts" width="450" height="698" /></a><p class="wp-caption-text">Password Status Information of all user accounts</p></div></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://howtoideas.net/the-passwd-command-terminal/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Login and Logout using login, exit, logout commands &#8211; Terminal</title>
		<link>http://howtoideas.net/login-and-logout-in-terminal</link>
		<comments>http://howtoideas.net/login-and-logout-in-terminal#comments</comments>
		<pubDate>Thu, 15 Dec 2011 21:19:28 +0000</pubDate>
		<dc:creator>Rohit</dc:creator>
				<category><![CDATA[Unix Terminal]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[exit]]></category>
		<category><![CDATA[exit command]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[login]]></category>
		<category><![CDATA[logout]]></category>
		<category><![CDATA[shell programs]]></category>
		<category><![CDATA[Terminal]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[Unix]]></category>

		<guid isPermaLink="false">http://howtoideas.net/?p=2920</guid>
		<description><![CDATA[If you are working on large system and the administrator has provided you just a terminal, then you can login to that workstation if you have your own user-id and password. In this example I will login to my own workstation using user-id howtoideas. Loging In: You can login to a workstation using following command login [username] example login howtoideas If above command is showing an error &#8220;login: Cannot possibly... <span class="meta-more"><a href="http://howtoideas.net/login-and-logout-in-terminal">Read more &#187;</a></span>]]></description>
				<content:encoded><![CDATA[<p>If you are working on large system and the administrator has provided you just a <strong>terminal</strong>, then you can login to that workstation if you have your own user-id and password. In this example I will login to my own workstation using user-id howtoideas.</p>
<p><strong>Loging In</strong>:</p>
<p>You can login to a workstation using following command</p>
<blockquote><p><code>login [username]</code></p></blockquote>
<p>example</p>
<blockquote><p><code>login howtoideas</code></p></blockquote>
<p>If above command is showing an error <strong>&#8220;login: Cannot possibly work without effective root&#8221;</strong>, then you need a root access to login. So, you can use the following command instead of upper command</p>
<blockquote><p><code>sudo login howtoideas</code></p></blockquote>
<div id="attachment_2926" class="wp-caption aligncenter" style="width: 411px"><a href="http://howtoideas.net/login-and-logout-in-terminal/login-terminal" rel="attachment wp-att-2926"><img class="size-full wp-image-2926" title="Login - Terminal" src="http://howtoideas.net/wp-content/uploads/2011/12/Login-Terminal.png" alt="Login - Terminal" width="401" height="98" /></a><p class="wp-caption-text">Login - Terminal</p></div>
<p>System will ask you to provide password for the root account first and then for the account you want to login if you are loging in using sudo command otherwise it will ask only the password of the account you are trying to login to.</p>
<p>If you have provided wrong user-id or wrong password, then you will get an error <strong>&#8220;Login incorrect&#8221;</strong>.</p>
<div id="attachment_2924" class="wp-caption aligncenter" style="width: 423px"><a href="http://howtoideas.net/login-and-logout-in-terminal/login-error-terminal" rel="attachment wp-att-2924"><img class="size-full wp-image-2924" title="Login Error - Terminal" src="http://howtoideas.net/wp-content/uploads/2011/12/Login-Error-Terminal.png" alt="Login Error - Terminal" width="413" height="124" /></a><p class="wp-caption-text">Login Error - Terminal</p></div>
<p>If you have provided both user-id and password correct, then it will log you into that account as shown in following image.</p>
<div id="attachment_2925" class="wp-caption aligncenter" style="width: 531px"><a href="http://howtoideas.net/login-and-logout-in-terminal/login-successful-terminal" rel="attachment wp-att-2925"><img class="size-full wp-image-2925" title="Login Successful - Terminal" src="http://howtoideas.net/wp-content/uploads/2011/12/Login-Successful-Terminal.png" alt="Login Successful - Terminal" width="521" height="250" /></a><p class="wp-caption-text">Login Successful - Terminal</p></div>
<p><strong>Loging Out:</strong></p>
<p>You can logout by pressing <em>Ctrl</em> key and the character <em>d</em> i.e by using <code><em>[Ctrl + D]</em></code>. This will work on most of the shell. But in some other shell programs like <a href="http://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=1&amp;ved=0CDEQFjAA&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FC_shell&amp;ei=sWjqToyjEZGGrAfC16iKCQ&amp;usg=AFQjCNE8JYH8tm2n0jRJJIZ-NIJzRPzrkw&amp;sig2=YejsGMQpJflHXS_lxC-4yw" target="_blank">C Shell</a> which use <em>%</em> as prompt. On those account <code>logout</code> command will work fine.</p>
<blockquote><p><code>logout</code></p></blockquote>
<div id="attachment_2927" class="wp-caption aligncenter" style="width: 333px"><a href="http://howtoideas.net/login-and-logout-in-terminal/logout-terminal" rel="attachment wp-att-2927"><img class="size-full wp-image-2927" title="logout - Terminal" src="http://howtoideas.net/wp-content/uploads/2011/12/logout-Terminal.png" alt="logout - Terminal" width="323" height="99" /></a><p class="wp-caption-text">logout - Terminal</p></div>
<p>You can also logout using exit command.</p>
<blockquote><p><code>exit</code></p></blockquote>
<div id="attachment_2923" class="wp-caption aligncenter" style="width: 337px"><a href="http://howtoideas.net/login-and-logout-in-terminal/exit-terminal" rel="attachment wp-att-2923"><img class="size-full wp-image-2923" title="exit - Terminal" src="http://howtoideas.net/wp-content/uploads/2011/12/exit-Terminal.png" alt="exit - Terminal" width="327" height="113" /></a><p class="wp-caption-text">exit - Terminal</p></div>
]]></content:encoded>
			<wfw:commentRss>http://howtoideas.net/login-and-logout-in-terminal/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
