<?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>run command Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/run-command/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Tue, 11 Dec 2018 09:54:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Run Command as Other Users on Linux</title>
		<link>https://www.osradar.com/run-command-as-other-users-on-linux/</link>
					<comments>https://www.osradar.com/run-command-as-other-users-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Tue, 11 Dec 2018 09:54:30 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[linux command]]></category>
		<category><![CDATA[run command]]></category>
		<category><![CDATA[run linux command as other user]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=8269</guid>

					<description><![CDATA[<p>In Linux, there are a number of situations where running a certain command as another user is necessary. It’s especially true in the professional/enterprise environment where there are a number of users. This method is also useful if one user doesn’t have any particular shells. Running command For performing the action, you have to follow [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/run-command-as-other-users-on-linux/">Run Command as Other Users on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In Linux, there are a number of situations where running a certain command as another user is necessary. It’s especially true in the professional/enterprise environment where there are a number of users. This method is also useful if one user doesn’t have any particular shells.</p>
<h1>Running command</h1>
<p>For performing the action, you have to follow the following structure –</p>
<pre class="">su -s &lt;shell_path&gt; &lt;user_name&gt; -c &lt;command&gt;</pre>
<p>For example, I have Apache installed and there’s a PHP file at the location “/var/www/html”. In order to run the file as user “viktor”, the following command will be necessary –</p>
<pre class="">su -s /bin/sh viktor -c "/usr/bin/php /var/www/html/php_demo.php"</pre>
<p><img loading="lazy" class="size-full wp-image-8273 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/12/user-1.png" alt="" width="1051" height="264" srcset="https://www.osradar.com/wp-content/uploads/2018/12/user-1.png 1051w, https://www.osradar.com/wp-content/uploads/2018/12/user-1-300x75.png 300w, https://www.osradar.com/wp-content/uploads/2018/12/user-1-768x193.png 768w, https://www.osradar.com/wp-content/uploads/2018/12/user-1-1024x257.png 1024w" sizes="(max-width: 1051px) 100vw, 1051px" /></p>
<p>Enjoy!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/run-command-as-other-users-on-linux/">Run Command as Other Users on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/run-command-as-other-users-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
