<?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>sebthom.de &#187; Linux</title>
	<atom:link href="http://sebthom.de/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://sebthom.de</link>
	<description>IT Freelancer - Java, J2EE, IBM WebSphere Portal, Lotus Notes/Domino</description>
	<lastBuildDate>Thu, 09 Sep 2010 12:18:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=abc</generator>
	<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>Determine the user who logged on via SSH</title>
		<link>http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/</link>
		<comments>http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 16:16:23 +0000</pubDate>
		<dc:creator>Sebastian Thomschke</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[username]]></category>

		<guid isPermaLink="false">http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/</guid>
		<description><![CDATA[     <link rel="alternate" type="application/atom+xml" title="sebthom.de Category: Linux" href="http://sebthom.de/category/it/linux/feed/" />
Today we had the need to determine the initial id of a user who logged onto a Linux box via SSH and executed the su command. When the su command is issued the effective user is changed and whoami or id commands will report that new user id instead.
For anyone who is interested, that is [...]]]></description>
			<content:encoded><![CDATA[<p>Today we had the need to determine the initial id of a user who logged onto a Linux box via SSH and executed the <b>su</b> command. When the <b>su</b> command is issued the effective user is changed and <b>whoami</b> or <b>id</b> commands will report that new user id instead.</p>
<p>For anyone who is interested, that is what we came up to put the initial user id into a variable named ${LOGIN_USER}</p>
<pre>LOGIN_USER=`who -m`; LOGIN_USER=${LOGIN_USER%% *}</pre>
<p>or alternatively</p>
<pre>LOGIN_USER=`who -m | cut -d' ' -f1`</pre>
 <img src="http://sebthom.de/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&post_id=134" width="1" height="1" style="display: none;" /><hr />
<p><small>&copy; sebthom for <a href="http://sebthom.de">sebthom.de</a>, 2009. |
<a href="http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/">Permalink</a> |
<a href="http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/#comments">No comment</a> |
Add to
<a href="http://del.icio.us/post?url=http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/&amp;title=Determine the user who logged on via SSH">del.icio.us</a>
<br/>
Post tags: <a href="http://sebthom.de/tag/bash/" rel="nofollow tag">bash</a>, <a href="http://sebthom.de/tag/linux/" rel="nofollow tag">Linux</a>, <a href="http://sebthom.de/tag/username/" rel="nofollow tag">username</a><br/>
</small></p>
<p><small>Feed enhanced by <a href='http://planetozh.com/blog/my-projects/wordpress-plugin-better-feed-rss/'>Better Feed</a> from  <a href='http://planetozh.com/blog/'>Ozh</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://sebthom.de/134-determine-the-user-who-logged-on-via-ssh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
