<?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>MemoSoup &#187; password</title>
	<atom:link href="http://www.memosoup.com/tag/password/feed" rel="self" type="application/rss+xml" />
	<link>http://www.memosoup.com</link>
	<description>Mix of the things I always forget</description>
	<lastBuildDate>Fri, 30 Jul 2010 15:59:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Reading password in Unix shell</title>
		<link>http://www.memosoup.com/20100202/reading-password-in-unix-shell.html</link>
		<comments>http://www.memosoup.com/20100202/reading-password-in-unix-shell.html#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:18:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[shell]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=256</guid>
		<description><![CDATA[print -n &#34;Enter Your password:&#34;
stty_orig=`stty -g`
trap &#34;stty ${stty_orig}; exit&#34; 1 2 3 15
stty -echo &#62;&#38;- 2&#62;&#38;-
read PASS 
stty ${stty_orig} &#62;&#38;- 2&#62;&#38;-
trap 1 2 3 15
print
<p>trap  :catches interruptions. I.e. if the user presses Ctrl+C, the normal stty mode is set before stopping the program
stty -echo  :switches off the display echo
&#62;&#38;- 2&#62;&#38;-  :helps to avoid [...]]]></description>
			<content:encoded><![CDATA[<div class="codecolorer-container bash default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="bash codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">print <span style="color: #660033;">-n</span> <span style="color: #ff0000;">&quot;Enter Your password:&quot;</span><br />
<span style="color: #007800;">stty_orig</span>=<span style="color: #000000; font-weight: bold;">`</span><span style="color: #c20cb9; font-weight: bold;">stty</span> -g<span style="color: #000000; font-weight: bold;">`</span><br />
<span style="color: #7a0874; font-weight: bold;">trap</span> <span style="color: #ff0000;">&quot;stty <span style="color: #007800;">${stty_orig}</span>; exit&quot;</span> <span style="color: #000000;">1</span> <span style="color: #000000;">2</span> <span style="color: #000000;">3</span> <span style="color: #000000;">15</span><br />
<span style="color: #c20cb9; font-weight: bold;">stty</span> <span style="color: #660033;">-echo</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>- <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span>-<br />
<span style="color: #c20cb9; font-weight: bold;">read</span> PASS <br />
<span style="color: #c20cb9; font-weight: bold;">stty</span> <span style="color: #800000;">${stty_orig}</span> <span style="color: #000000; font-weight: bold;">&gt;&amp;</span>- <span style="color: #000000;">2</span><span style="color: #000000; font-weight: bold;">&gt;&amp;</span>-<br />
<span style="color: #7a0874; font-weight: bold;">trap</span> <span style="color: #000000;">1</span> <span style="color: #000000;">2</span> <span style="color: #000000;">3</span> <span style="color: #000000;">15</span><br />
print</div></div>
<p><strong>trap</strong>  :catches interruptions. I.e. if the user presses Ctrl+C, the normal stty mode is set before stopping the program<br />
<strong>stty -echo</strong>  :switches off the display echo<br />
<strong>&gt;&amp;- 2&gt;&amp;-</strong>  :helps to avoid <strong>&#8220;stty: Not a typewriter&#8221;</strong> message for non-interactive scripts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20100202/reading-password-in-unix-shell.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle: password function</title>
		<link>http://www.memosoup.com/20090923/oracle-password-function.html</link>
		<comments>http://www.memosoup.com/20090923/oracle-password-function.html#comments</comments>
		<pubDate>Wed, 23 Sep 2009 11:39:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Oracle]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[password]]></category>

		<guid isPermaLink="false">http://www.memosoup.com/?p=169</guid>
		<description><![CDATA[<p>Find the name of the current password function</p>
SELECT * FROM DBA_PROFILES WHERE RESOURCE_NAME='PASSWORD_VERIFY_FUNCTION';
<p>Change the password function for the profile:</p>
ALTER PROFILE &#38;profile. LIMIT PASSWORD_VERIFY_FUNCTION &#38;function_name.;
<p>Example of the password function:</p>
CREATE OR REPLACE FUNCTION dummy_func
&#160;&#40;USERNAME VARCHAR2, PASSWORD VARCHAR2, OLD_PASSWORD VARCHAR2&#41;
&#160;RETURN BOOLEAN IS
&#160;BEGIN
&#160; &#160;IF NLS_LOWER&#40;password&#41; = NLS_LOWER&#40;username&#41; THEN
&#160; &#160; &#160; raise_application_error&#40;-20001, 'Password is the same as the username'&#41;;
&#160; &#160;END [...]]]></description>
			<content:encoded><![CDATA[<p>Find the name of the current password function</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">SELECT</span> <span style="color: #66cc66;">*</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FROM</span> DBA_PROFILES <span style="color: #993333; font-weight: bold; text-transform: uppercase;">WHERE</span> RESOURCE_NAME<span style="color: #66cc66;">=</span><span style="color: #ff0000;">'PASSWORD_VERIFY_FUNCTION'</span>;</div></div>
<p>Change the password function for the profile:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">ALTER</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">PROFILE</span> &amp;profile. LIMIT PASSWORD_VERIFY_FUNCTION &amp;function_name.;</div></div>
<p>Example of the password function:</p>
<div class="codecolorer-container oracle8 default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:100%;"><div class="oracle8 codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #993333; font-weight: bold; text-transform: uppercase;">CREATE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">OR</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">REPLACE</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">FUNCTION</span> dummy_func<br />
&nbsp;<span style="color: #66cc66;">&#40;</span>USERNAME <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">,</span> PASSWORD <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">,</span> OLD_PASSWORD <span style="color: #993333; font-weight: bold; text-transform: uppercase;">VARCHAR2</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">RETURN</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">BOOLEAN</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IS</span><br />
&nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">BEGIN</span><br />
&nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NLS_LOWER</span><span style="color: #66cc66;">&#40;</span>password<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">=</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">NLS_LOWER</span><span style="color: #66cc66;">&#40;</span>username<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">THEN</span><br />
&nbsp; &nbsp; &nbsp; raise_application_error<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">-</span><span style="color: #cc66cc;">20001</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'Password is the same as the username'</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span> <span style="color: #993333; font-weight: bold; text-transform: uppercase;">IF</span>;<br />
&nbsp; &nbsp;<span style="color: #993333; font-weight: bold; text-transform: uppercase;">RETURN</span><span style="color: #66cc66;">&#40;</span><span style="color: #993333; font-weight: bold; text-transform: uppercase;">TRUE</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #993333; font-weight: bold; text-transform: uppercase;">END</span>;</div></div>
]]></content:encoded>
			<wfw:commentRss>http://www.memosoup.com/20090923/oracle-password-function.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
