<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Unix on The Shadow File</title>
    <link>https://shadowfile.inode.link/tags/unix/</link>
    <description>Recent content in Unix on The Shadow File</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Thu, 08 Jan 2009 06:31:00 -0800</lastBuildDate>
    <atom:link href="https://shadowfile.inode.link/tags/unix/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>How to sudoedit non-interactively</title>
      <link>https://shadowfile.inode.link/blog/2009/01/how-to-sudoedit-non-interactively/</link>
      <pubDate>Thu, 08 Jan 2009 06:31:00 -0800</pubDate>
      <guid>https://shadowfile.inode.link/blog/2009/01/how-to-sudoedit-non-interactively/</guid>
      <description>&lt;p&gt;Okay, this one&amp;rsquo;s a bit esoteric, but I think it&amp;rsquo;s pretty cool. How do&#xA;you use &amp;lsquo;sudoedit&amp;rsquo; non-interactively such as from a script? Just a brief&#xA;background about sudo: sudo is an authentication mechanism in Unix &amp;amp;&#xA;Linux that allows unprivileged users to run specific commands (as&#xA;defined by the system administrator) with root privileges without having&#xA;the root password. This has several advantages over logging in as&#xA;root:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Users can have specific, limited set of root privileges without&#xA;having the entire set of root privileges.&lt;/li&gt;&#xA;&lt;li&gt;Users use their &lt;!-- raw HTML omitted --&gt;own&lt;!-- raw HTML omitted --&gt;&#xA;password, so the root password doesn&amp;rsquo;t have to be shared. If a&#xA;user&amp;rsquo;s sudo privileges are revoked, the root password doesn&amp;rsquo;t have&#xA;to be reset.&lt;/li&gt;&#xA;&lt;li&gt;Each use of sudo is audited per user, so that each time sudo&#xA;privileges are invoked, there is an event in the system logs that&#xA;identifies the specific user and the command they ran.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Sudoedit is a command that is related to sudo. It lets users edit files&#xA;that normally only root can edit, such as system configuration files.&#xA;However instead of using &amp;ldquo;sudo&amp;rdquo; followed by the editing command, the&#xA;user runs &amp;ldquo;sudoedit filename&amp;rdquo; and sudo invokes the user&amp;rsquo;s default&#xA;editor, letting them edit the file.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
