[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[plamo:03421] Re: shutdown処理について
-
From:Satoru KATO
-
Date:Thu, 22 Jul 1999 21:03:36 +0900
- Subject: [plamo:03421] Re: shutdown処理について
- From: Satoru KATO <kato@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 22 Jul 1999 21:03:36 +0900
- Posted: Thu, 22 Jul 1999 21:03:32 +0900
加藤@カシオ計算機です。
もう解決した模様ですが....。
In message <3796FBD6.FEF66595@art-tec.co.jp>
"[plamo:03418] Re: shutdown処理について"
"t-sugioka <sugioka@art-tec.co.jp>" wrote:
>私の質問は、ログイン時にある特定のユーザ(ここではshutdownという名前)が
>ログインすると、そのユーザは(手入力するのではなくシェル等で)シャットダウ
>ン処理のみ実行し、
>それ以外には何も実行できないようにしたいのです。
>説明が下手ですみませんが、よろしくおねがいします。
昔、私のところではまさにこのような方法でシャットダウンさせていました。
shutdown でログインするとリブート
shut でログインすると Halt
みたいに。
他にも、同じようなやりかたで、lpqでログインすると、lpq -l の結果を
画面に表示させたり(プリンタサーバーだったんです)もさせていました。
やってることは簡単で、shutdown というユーザーにrootと同じuser idと
group idを与えておき、ログインするときに実行されるshellにシャットダウン
処理を書いたスクリプトを設定しておくだけです。
#当然ですが、設定するにはrootの権限が必要です。
いささか、セキュリティホールになりそうなやり方ですし、今ではShutdown
させることも無くなった(年中無休で動いてます)ので最近はやってませんが
「こう言う方法もあるよ」ということで....。
/etc/passwd --------------------------------------------------------
:
shutdown:x:0:0:shutdown,,,:/home/shutdown:/home/shutdown/.profile
shut:x:0:0:shut,,,:/home/shut:/home/shut/.profile
:
/home/shutdown/.profile --------------------------------------------
#!/bin/sh
cd /
sync
sync
/sbin/shutdown -r now
/home/shut/.profile -------------------------------------------------
#!/bin/sh
cd /
sync
sync
/sbin/shutdown -h now
◇−◇−◇−◇−◇−◇ カシオ計算機株式会社 システム事業部
−◇−◇−◇−◇ 第1開発部 13設計室
◇−◇−◇ 加藤 智 ( kato@m2.sys.to.casio.co.jp)
- Follow-Ups
-
- [plamo:03422] Re: shutdown 処理について, Jun Kuwamura
- References
-
- [plamo:03418] Re: shutdown処理について, t-sugioka
[検索ページ]
[メール一覧]
Plamo ML 公開システム