urin.github.io - 特定のユーザ権限でのみ実行されるシェルスクリプト









Search Preview

特定のユーザ権限でのみ実行されるシェルスクリプト - URIN HACK

urin.github.io
あるシェルスクリプト(commands.sh とする)を特定のユーザ権限でのみ実行されるようにすることを考える。commands.sh の所有者が someone であれば sticky bit を使うだけでよい。chmod u+s commands.sh所有権が自分以外に変更できない場合、su すればいいだけだが su を忘れてしまうのを避けるにはどうするか。以下のような方法を考えてみた。(bash 限定)as_someone というファイルを準備する。if [[
.io > urin.github.io

SEO audit: Content analysis

Language Error! No language localisation is found.
Title 特定のユーザ権限でのみ実行されるシェルスクリプト - URIN HACK
Text / HTML ratio 27 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud commandssh Jekyll Linux bash echo コメント GitHub 特定のユーザ権限でのみ実行されるシェルスクリプト CSSのみでラジオボタンとチェックボックスをトグルボタンにする Linuxローカル環境用に最小限のyumリポジトリを作成する方法 jQuery su css JavaScript gcc Windows Ruby Octopress Batch jquerytilejs
Keywords consistency
Keyword Content Title Description Headings
commandssh 4
Jekyll 4
Linux 3
bash 3
echo 3
コメント 2
Headings
H1 H2 H3 H4 H5 H6
2 0 3 0 0 0
Images We found 5 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
commandssh 4 0.20 %
Jekyll 4 0.20 %
Linux 3 0.15 %
bash 3 0.15 %
echo 3 0.15 %
コメント 2 0.10 %
GitHub 2 0.10 %
特定のユーザ権限でのみ実行されるシェルスクリプト 2 0.10 %
CSSのみでラジオボタンとチェックボックスをトグルボタンにする 2 0.10 %
Linuxローカル環境用に最小限のyumリポジトリを作成する方法 2 0.10 %
jQuery 2 0.10 %
su 2 0.10 %
css 1 0.05 %
JavaScript 1 0.05 %
gcc 1 0.05 %
Windows 1 0.05 %
Ruby 1 0.05 %
Octopress 1 0.05 %
Batch 1 0.05 %
jquerytilejs 1 0.05 %

SEO Keywords (Two Word)

Keyword Occurrence Density
20171130 コメント 2 0.10 %
bash 2 2 0.10 %
2 Linux 2 0.10 %
Linux 4 2 0.10 %
コメント bash 2 0.10 %
Jekyll Ruby 1 0.05 %
Tags makefile 1 0.05 %
makefile fluentd 1 0.05 %
fluentd html 1 0.05 %
html C 1 0.05 %
C Jekyll 1 0.05 %
Batch Octopress 1 0.05 %
Ruby bash 1 0.05 %
bash Batch 1 0.05 %
20130811 要素の高さを揃える超軽量なjQueryプラグインjquerytilejs 1 0.05 %
Octopress GitHub 1 0.05 %
GitHub jQuery 1 0.05 %
jQuery Linux 1 0.05 %
Linux Windows 1 0.05 %
要素の高さを揃える超軽量なjQueryプラグインjquerytilejs Tags 1 0.05 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
20171130 コメント bash 2 0.10 % No
2 Linux 4 2 0.10 % No
コメント bash 2 2 0.10 % No
bash 2 Linux 2 0.10 % No
C Jekyll Ruby 1 0.05 % No
20130811 要素の高さを揃える超軽量なjQueryプラグインjquerytilejs Tags 1 0.05 % No
要素の高さを揃える超軽量なjQueryプラグインjquerytilejs Tags makefile 1 0.05 % No
Tags makefile fluentd 1 0.05 % No
makefile fluentd html 1 0.05 % No
fluentd html C 1 0.05 % No
html C Jekyll 1 0.05 % No
Jekyll Ruby bash 1 0.05 % No
20140212 設置が超簡単でカスタマイズ性の高い吹き出しホバー用jQueryプラグインjqueryballoonjs 20130811 1 0.05 % No
Ruby bash Batch 1 0.05 % No
bash Batch Octopress 1 0.05 % No
Batch Octopress GitHub 1 0.05 % No
Octopress GitHub jQuery 1 0.05 % No
GitHub jQuery Linux 1 0.05 % No
jQuery Linux Windows 1 0.05 % No
設置が超簡単でカスタマイズ性の高い吹き出しホバー用jQueryプラグインjqueryballoonjs 20130811 要素の高さを揃える超軽量なjQueryプラグインjquerytilejs 1 0.05 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
20171130 コメント bash 2 2 0.10 % No
コメント bash 2 Linux 2 0.10 % No
bash 2 Linux 4 2 0.10 % No
C Jekyll Ruby bash 1 0.05 % No
20130811 要素の高さを揃える超軽量なjQueryプラグインjquerytilejs Tags makefile 1 0.05 % No
要素の高さを揃える超軽量なjQueryプラグインjquerytilejs Tags makefile fluentd 1 0.05 % No
Tags makefile fluentd html 1 0.05 % No
makefile fluentd html C 1 0.05 % No
fluentd html C Jekyll 1 0.05 % No
html C Jekyll Ruby 1 0.05 % No
Jekyll Ruby bash Batch 1 0.05 % No
20140212 設置が超簡単でカスタマイズ性の高い吹き出しホバー用jQueryプラグインjqueryballoonjs 20130811 要素の高さを揃える超軽量なjQueryプラグインjquerytilejs 1 0.05 % No
Ruby bash Batch Octopress 1 0.05 % No
bash Batch Octopress GitHub 1 0.05 % No
Batch Octopress GitHub jQuery 1 0.05 % No
Octopress GitHub jQuery Linux 1 0.05 % No
GitHub jQuery Linux Windows 1 0.05 % No
jQuery Linux Windows gcc 1 0.05 % No
設置が超簡単でカスタマイズ性の高い吹き出しホバー用jQueryプラグインjqueryballoonjs 20130811 要素の高さを揃える超軽量なjQueryプラグインjquerytilejs Tags 1 0.05 % No
200Windowsに導入 20140212 設置が超簡単でカスタマイズ性の高い吹き出しホバー用jQueryプラグインjqueryballoonjs 20130811 1 0.05 % No

Internal links in - urin.github.io

CSSのみでラジオボタンとチェックボックスをトグルボタンにする
CSSのみでラジオボタンとチェックボックスをトグルボタンにする - URIN HACK
特定のユーザ権限でのみ実行されるシェルスクリプト
特定のユーザ権限でのみ実行されるシェルスクリプト - URIN HACK
Linuxローカル環境用に最小限のyumリポジトリを作成する方法
Linuxローカル環境用に最小限のyumリポジトリを作成する方法 - URIN HACK
fluent-plugin-dstatで取得した値が不正になる問題を解決
fluent-plugin-dstatで取得した値が不正になる問題を解決 - URIN HACK
logrotate.bat - Windowsのバッチファイルでログローテート
logrotate.bat - Windowsのバッチファイルでログローテート - URIN HACK
C++で無名関数の関数ポインタを作る
C++で無名関数の関数ポインタを作る - URIN HACK
Jekyll 2.3.0をWindowsに導入
Jekyll 2.3.0をWindowsに導入 - URIN HACK
Jekyll 1.4.2をRuby 2.0.0+Windowsに導入
Jekyll 1.4.2をRuby 2.0.0+Windowsに導入 - URIN HACK
要素の高さを揃える超軽量なjQueryプラグインjquery.tile.js
要素の高さを揃える超軽量なjQueryプラグインjquery.tile.js - URIN HACK
makefile
タグ別記事一覧 - URIN HACK
fluentd
タグ別記事一覧 - URIN HACK
html
タグ別記事一覧 - URIN HACK
C++
タグ別記事一覧 - URIN HACK
Jekyll
タグ別記事一覧 - URIN HACK
Ruby
タグ別記事一覧 - URIN HACK
bash
タグ別記事一覧 - URIN HACK
Batch
タグ別記事一覧 - URIN HACK
Octopress
タグ別記事一覧 - URIN HACK
GitHub
タグ別記事一覧 - URIN HACK
jQuery
タグ別記事一覧 - URIN HACK
Linux
タグ別記事一覧 - URIN HACK
Windows
タグ別記事一覧 - URIN HACK
gcc
タグ別記事一覧 - URIN HACK
JavaScript
タグ別記事一覧 - URIN HACK
css
タグ別記事一覧 - URIN HACK
jquery.tile.js
jquery.tile.js Demo page
jquery.balloon.js
jquery.balloon.js Demo page

Urin.github.io Spined HTML


特定のユーザ権限でのみ実行されるシェルスクリプト - URIN HACK  2017-11-30 コメント whack 2 Linux 4 特定のユーザ権限でのみ実行されるシェルスクリプト あるシェルスクリプト(commands.sh とする)を特定のユーザ権限でのみ実行されるようにすることを考える。 commands.sh の所有者が someone であれば sticky bit を使うだけでよい。 chmod u+s commands.sh 所有権が自分以外に変更できない場合、su すればいいだけだが su を忘れてしまうのを避けるにはどうするか。 以下のような方法を考えてみた。(bash 限定) as_someone というファイルを準備する。 if [[ "$USER" != "someone" ]]; then reverberate -n 'Enter someone ' su - someone -c "$(readlink -f $0) $*" exit fi このファイルには実行権はつけず、someone として実行させたいシェルスクリプトと同じディレクトリに置く。 commands.sh は以下のようにすればよい。 #!/bin/bash . $(dirname $0)/as_someone reverberate "Following commands are executed by someone." reverberate "I am $USER" env : これで commands.sh は someone として実行することもできるし、間違って別ユーザで実行した場合でもパスワードさえ入力すれば someone として実行される。  2017-11-30 コメント whack 2 Linux 4 Linuxローカル環境用に最小限のyumリポジトリを作成する方法 CSSのみでラジオボタンとチェックボックスをトグルボタンにする Please enable JavaScript to view the comments powered by Disqus. Recent Entries 2018-02-04 CSSのみでラジオボタンとチェックボックスをトグルボタンにする 2017-11-30 特定のユーザ権限でのみ実行されるシェルスクリプト 2017-02-25 Linuxローカル環境用に最小限のyumリポジトリを作成する方法 2016-11-12 fluent-plugin-dstatで取得した値が不正になる問題を解決 2015-09-19 logrotate.bat - Windowsのバッチファイルでログローテート 2015-04-05 C++で無名関数の関数ポインタを作る 2014-08-14 Jekyll 2.3.0をWindowsに導入 2014-03-02 Jekyll 1.4.2をRuby 2.0.0+Windowsに導入 2014-02-12 設置が超簡単でカスタマイズ性の高い吹き出しホバー用jQueryプラグインjquery.balloon.js 2013-08-11 要素の高さを揃える超軽量なjQueryプラグインjquery.tile.js Tags makefile fluentd html C++ Jekyll Ruby whack Batch Octopress GitHub jQuery Linux Windows gcc JavaScript css Repositories jquery.tile.js 要素の高さを揃える超軽量なjQueryプラグイン jquery.balloon.js 設置もカスタマイズも超簡単な吹き出しホバー用jQueryプラグイン wers Windows用Rubyバージョン管理ツール(rbenvのWindows版) jquery.stretchable.js 要素を浮かせて伸ばすボタンを付けるjQueryプラグイン .vimrc Vim用設定ファイル Styled with Twitter Bootstrap 3. Scripted with jQuery. Powered by Jekyll version 3.4.1. Hosted on GitHub. Managed with git. © 2013 - 2018 うりん