<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>gsf_zero1</author_name>
  <author_url>https://blog.hatena.ne.jp/gsf_zero1/</author_url>
  <blog_title>いろいろ備忘録日記</blog_title>
  <blog_url>https://devlights.hatenablog.com/</blog_url>
  <categories>
    <anon>linux</anon>
  </categories>
  <description>概要 概要 小ネタ。よく忘れるのでメモメモ。 sudo コマンドはよく利用するコマンドですが、これを「rootユーザ権限でコマンド実行する」と認識している人が結構います。 sudoコマンドは、「指定したコマンドを別のユーザ権限で実行する」コマンドとなりますので、root ユーザ以外のユーザ権限でもコマンドを実行できます。 root ユーザ以外のユーザ権限でコマンドを実行する場合は、 -u オプションが必要となり $ sudo -u 別のユーザ コマンド という形になります。 例えば、postgresql を実行したいけど、今は postgres ユーザではない場合は $ sudo -u pos…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdevlights.hatenablog.com%2Fentry%2F2021%2F01%2F07%2F232603&quot; title=&quot;sudo で root 以外のユーザでコマンドを実行 - いろいろ備忘録日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2021-01-07 23:26:03</published>
  <title>sudo で root 以外のユーザでコマンドを実行</title>
  <type>rich</type>
  <url>https://devlights.hatenablog.com/entry/2021/01/07/232603</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
