<?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>account password &#8211; lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</title>
	<atom:link href="https://lifelinux.com/tag/account-password/feed/" rel="self" type="application/rss+xml" />
	<link>https://lifelinux.com</link>
	<description>All About Linux !</description>
	<lastBuildDate>Wed, 18 May 2011 06:59:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.3</generator>
	<item>
		<title>Setting Up Password Aging In Linux</title>
		<link>https://lifelinux.com/setting-up-password-aging-in-linux/</link>
					<comments>https://lifelinux.com/setting-up-password-aging-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Wed, 18 May 2011 06:18:22 +0000</pubDate>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[/etc/login.defs]]></category>
		<category><![CDATA[account password]]></category>
		<category><![CDATA[chage command]]></category>
		<category><![CDATA[configuration name]]></category>
		<category><![CDATA[configuration parameter]]></category>
		<category><![CDATA[enterprise linux]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[linux users]]></category>
		<category><![CDATA[PAM]]></category>
		<category><![CDATA[pass max days]]></category>
		<category><![CDATA[pass min days]]></category>
		<category><![CDATA[pass warn age]]></category>
		<category><![CDATA[password expiry]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[rhel]]></category>
		<category><![CDATA[shadow password]]></category>
		<category><![CDATA[usermod command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=611</guid>

					<description><![CDATA[<p>By default, all the account password expiration in Linux are disabled. There have two method to enable and disable password expiration, one of method by editing /etc/shadow file. Another method is using chage command. 1. Edit /etc/shadow Login as root and type the following command # vi /etc/shadow Sample outputs ... lifelinux:$1$UgE5i8uC$mtNxSoPOCl5G5.9mQOQLy.:15092:0:99999:7::: ... As with [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/setting-up-password-aging-in-linux/">Setting Up Password Aging In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><p>By default, all the account password expiration in Linux are disabled. There have two method to enable and disable password expiration, one of method by editing /etc/shadow file. Another method is using chage command.<span id="more-611"></span></p>
<h3>1. Edit /etc/shadow</h3>
<p>Login as root and type the following command</p>
<pre>
# vi /etc/shadow
</pre>
<p>Sample outputs</p>
<pre>
...
lifelinux:$1$UgE5i8uC$mtNxSoPOCl5G5.9mQOQLy.:15092:0:99999:7:::
...
</pre>
<p>As with the passwd file, each field in the shadow file is also separated with &#8220;:&#8221; colon characters, and are as follows:<br />
1. Username, up to 8 characters. Case-sensitive, usually all lowercase. A direct match to the username in the /etc/passwd file.<br />
2. Password, 13 character encrypted. A blank entry (eg. ::) indicates a password is not required to log in (usually a bad idea), and a &#8220;*&#8221; entry (eg. :*:) indicates the account has been disabled.<br />
3. The number of days (since January 1, 1970) since the password was last changed.<br />
4. The number of days before password may be changed (0 indicates it may be changed at any time)<br />
5. The number of days after which password must be changed (99999 indicates user can keep his or her password unchanged for many, many years)<br />
6. The number of days to warn user of an expiring password (7 for a full week)<br />
7. The number of days after password expires that account is disabled<br />
8. The number of days since January 1, 1970 that an account has been disabled<br />
9. A reserved field for possible future use<br />
<strong>Syntax:</strong></p>
<pre>
{userName}:{password}:{lastpasswdchanged}:{Minimum_days}:{Maximum_days}:{Warn}:{Inactive}:{Expire}:
</pre>
<h3>2. Using chage command</h3>
<pre>
Usage: chage [options] user

Options:
  -d, --lastday LAST_DAY        set last password change to LAST_DAY
  -E, --expiredate EXPIRE_DATE  set account expiration date to EXPIRE_DATE
  -h, --help                    display this help message and exit
  -I, --inactive INACTIVE       set password inactive after expiration
                                to INACTIVE
  -l, --list                    show account aging information
  -m, --mindays MIN_DAYS        set minimum number of days before password
                                change to MIN_DAYS
  -M, --maxdays MAX_DAYS        set maximim number of days before password
                                change to MAX_DAYS
  -W, --warndays WARN_DAYS      set expiration warning days to WARN_DAYS
</pre>
<p>To list current aging type chage command for particular user account, example lifelinux, enter</p>
<pre>
# chage -l lifelinux
</pre>
<p>Sample outputs</p>
<pre>
Last password change                                    : Apr 28, 2011
Password expires                                        : never
Password inactive                                       : never
Account expires                                         : never
Minimum number of days between password change          : 0
Maximum number of days between password change          : 99999
Number of days of warning before password expires       : 7
</pre>
<p><strong>Example:</strong> Set password aging for lifelinux, force password change every 60 days (-M 60), and prevent password changes for seven days (-m 7). Login users will receiving warnings 7 days (-W 7) and account will be locked after 7 days (-I 7).</p>
<pre>
# chage -m 7 -M 60 -W 7 -I 7 lifelinux
</pre>
<p>To Disable password aging, enter</p>
<pre>
# chage -m 0 -M 99999 -I -1 lifelinux
</pre>
<p>Force user to change password at first login, enter</p>
<pre>
# chage -d 0 lifelinux
</pre>
<g:plusone href="https://lifelinux.com/setting-up-password-aging-in-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/setting-up-password-aging-in-linux/">Setting Up Password Aging In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/setting-up-password-aging-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Deny Or Block User Login In Linux</title>
		<link>https://lifelinux.com/how-to-deny-or-block-user-account-in-linux/</link>
					<comments>https://lifelinux.com/how-to-deny-or-block-user-account-in-linux/#respond</comments>
		
		<dc:creator><![CDATA[lifeLinux]]></dc:creator>
		<pubDate>Sun, 15 May 2011 01:24:35 +0000</pubDate>
				<category><![CDATA[Sys Admin]]></category>
		<category><![CDATA[account password]]></category>
		<category><![CDATA[allow login]]></category>
		<category><![CDATA[deny login]]></category>
		<category><![CDATA[encrypted password]]></category>
		<category><![CDATA[passwd command]]></category>
		<category><![CDATA[usermod command]]></category>
		<guid isPermaLink="false">http://www.lifelinux.com/?p=560</guid>

					<description><![CDATA[<p>Deny user login by /etc/shadow Default, Linux systems use /etc/shadow to store the encrypted user passwords. The quickest way to block a user is to alter is password stored in /etc/shadow. Normally an active user account will have one line in /etc/shadow that will look like: files:$1$x52JQZle$82KTK0hbzozR3BRuwEWLF.:14970:0:99999:7::: Where the second field is the encrypted password. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-deny-or-block-user-account-in-linux/">How To Deny Or Block User Login In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p></p><h3>Deny user login by /etc/shadow</h3>
<p>Default, Linux systems use /etc/shadow to store the encrypted user passwords. The quickest way to block a user is to alter is password stored in /etc/shadow. Normally an active user account will have one line in /etc/shadow that will look like:</p>
<pre>
files:$1$x52JQZle$82KTK0hbzozR3BRuwEWLF.:14970:0:99999:7:::
</pre>
<p><span id="more-560"></span><br />
Where the second field is the encrypted password. If we replace the password with &#8220;*&#8221; or &#8220;!&#8221; this will make the account unusable, and it will mean that no login is permitted for the user</p>
<pre>
files:!:14970:0:99999:7:::
</pre>
<h3>Deny user login by passwd command</h3>
<p>Use flag -l to lock the specified account and it is available to root only, example deny user1 login</p>
<pre>
# passwd -l user1
</pre>
<h3>Deny user login by usermod command</h3>
<p>The /sbin/nologin command politely refuse a login. It displays a message that an account is not available and exits non-zero. This is prefreed method these days to deny login access to account. You can also change shell to /sbin/nologin, type the following command</p>
<pre>
# usermod -s /sbin/nologin user1
</pre>
<p>Verify with these commands:</p>
<pre>
# cat /etc/passwd | grep user1
</pre>
<p>Shown as follows</p>
<pre>
user1:x:607:605::/home/user1:/sbin/nologin
</pre>
<g:plusone href="https://lifelinux.com/how-to-deny-or-block-user-account-in-linux/" size="standard"  annotation="none"   ></g:plusone><p>The post <a rel="nofollow" href="https://lifelinux.com/how-to-deny-or-block-user-account-in-linux/">How To Deny Or Block User Login In Linux</a> appeared first on <a rel="nofollow" href="https://lifelinux.com">lifeLinux: Linux Tips, Hacks, Tutorials, Ebooks</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://lifelinux.com/how-to-deny-or-block-user-account-in-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
