Mondo Rescue
2014年5月4日日曜日
2014年4月29日火曜日
tmuxでbashの履歴を即座に書き出す設定
function share_history {
history -a
history -c
history -r
}
PROMPT_COMMAND='share_history'
shopt -u histappend
2014年3月22日土曜日
dovecotで特定のユーザのみ接続許可する
/etc/pam.d/dovecot
をいじってこんな感じにするといい
参考リンク
http://wiki2.dovecot.org/Authentication/RestrictAccess
をいじってこんな感じにするといい
#%PAM-1.0 @include common-auth account required pam_succeed_if.so user = hogeuser @include common-account @include common-session
参考リンク
http://wiki2.dovecot.org/Authentication/RestrictAccess
2014年3月9日日曜日
2014年2月2日日曜日
2014年1月13日月曜日
xrandrの使い方
wikipedia分かりやすい
モニターと可能な設定の表示
xrandr
全てのモニターを最高解像度で、同じ画面を表示する。
xrandr --auto
内蔵モニターの右側に外部モニターを表示。モニターの名前は、上の xrandr で調べられる。ここでは 内部モニター:LVDS、外部モニター:VGA とする。
xrandr --output VGA --right-of LVDS
内蔵モニターの上側に外部モニターを表示。
xrandr --output VGA --above LVDS
マルチモニターを使用する場合、X11の設定ファイル:通常 /etc/X11/xorg.conf で、仮想スクリーンの範囲を大きく取っておく。 例:
Virtual 2048 2048
参考リンク
http://ja.wikipedia.org/wiki/XRandR
関連記事
X11で縦表示とか画面の回転設定
モニターと可能な設定の表示
xrandr
全てのモニターを最高解像度で、同じ画面を表示する。
xrandr --auto
内蔵モニターの右側に外部モニターを表示。モニターの名前は、上の xrandr で調べられる。ここでは 内部モニター:LVDS、外部モニター:VGA とする。
xrandr --output VGA --right-of LVDS
内蔵モニターの上側に外部モニターを表示。
xrandr --output VGA --above LVDS
マルチモニターを使用する場合、X11の設定ファイル:通常 /etc/X11/xorg.conf で、仮想スクリーンの範囲を大きく取っておく。 例:
Virtual 2048 2048
参考リンク
http://ja.wikipedia.org/wiki/XRandR
関連記事
X11で縦表示とか画面の回転設定
2014年1月11日土曜日
Debianで無線LAN接続
今回はwicdを使う
無線デバイス確認
ファームインストール
あとはこんな感じで設定
Networkmanagerのアンインストール
Xなくてもつかえるwicd-cursesが便利だった
あとnetdevグループに属してないとwicd使えない
参考リンク
https://wiki.debian.org/WiFi/HowToUse#Wicd
https://wiki.debian.org/iwlwifi
無線デバイス確認
# lspci | grep -i wire 03:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG [Golan] Network Connection (rev 02)
ファームインストール
apt-get install firmware-iwlwifi
あとはこんな感じで設定
Networkmanagerのアンインストール
apt-get remove network-manager
# apt-getinstall install wicd # apt-getinstall wicd-curses
Xなくてもつかえるwicd-cursesが便利だった
あとnetdevグループに属してないとwicd使えない
参考リンク
https://wiki.debian.org/WiFi/HowToUse#Wicd
https://wiki.debian.org/iwlwifi
2014年1月2日木曜日
Debian wheezyで日本語環境設定
こんな感じ
apt-get install manpages-ja dpkg-reconfigure locales dpkg-reconfigure tzdata
2013年12月15日日曜日
chef bootstrapが使えないときにnodeを追加する
knife configure client /path/to/tempdir できたファイルをnodeに置く /etc/chef/client.rb /etc/chef/validation.pem で↓のコマンドでOK chef-client参考リンク
http://hivecolor.com/id/46
maildirsizeをMaildirに置くとクォータ設定できる
maildirsizeをMaildirに置くとクォータの設定ができる
dovecotとかmaildropが対応している
~/Maildir/maildirsize
dovecotとかmaildropが対応している
~/Maildir/maildirsize
8000C 284871170 10382
2013年11月10日日曜日
sopcastをDebian wheezyで使ってみる
ダウンロードは公式サイトから
http://www.itmedia.co.jp/help/tips/linux/l0448.html
なので、32bit用のライブラリ追加
あとはReadmeの通りこんな感じで起動
VLCで保存する場合はツールバー→メディア→変換/保存→ネットワークタブからできる
チャンネル一覧はこちら
SopCast.exeと同じフォルダに置く
https://gist.github.com/yaasita/7390590
file sp-sc-auth readelf -h sp-sc-authみたいにするとELF32の実行ファイルだとわかる
http://www.itmedia.co.jp/help/tips/linux/l0448.html
なので、32bit用のライブラリ追加
dpkg --add-architecture i386 apt-get install ia32-libs-i386
あとはReadmeの通りこんな感じで起動
./sp-sc-auth sop://broker.sopcast.com:3912/6001 3908 8908
VLCで保存する場合はツールバー→メディア→変換/保存→ネットワークタブからできる
チャンネル一覧はこちら
SopCast.exeと同じフォルダに置く
https://gist.github.com/yaasita/7390590
2013年9月16日月曜日
一切のパスワード認証を無効化する
Linuxでこんな設定した
ちょっとデモ用にLinuxデスクトップを見せたかったので・・・
/etc/pam.d/common-auth
の先頭に以下を追加
いますぐ実践! Linux システム管理 PAM の設定を理解する
ちょっとデモ用にLinuxデスクトップを見せたかったので・・・
/etc/pam.d/common-auth
の先頭に以下を追加
auth sufficient pam_permit.so
いますぐ実践! Linux システム管理 PAM の設定を理解する
2013年8月29日木曜日
smartdでHDD監視
インストール
apt-get install smartmontools
/etc/default/smartmontoolsの以下の行を有効にする
start_smartd=yes
/etc/smartd.confを編集
DEVICESCANをコメントアウトして設定を書く
#DEVICESCAN -d removable -n standby -m root -M exec /usr/share/smartmontools/smartd-runner /dev/sda -a -d sat -o on -S on -s (S/../.././02|L/../../6/03) -m hoge@example.com
こうするとメールのテストができるらしい
/dev/sda -a -d sat -o on -S on -s (S/../.././02|L/../../6/03) -m hoge@example.com -M test
参考リンク
http://www.geocities.jp/sugachan1973/doc/funto57.html
2013年8月25日日曜日
Debian WheezyにRTL8111/8168Bのドライバインストール
Realtekのドライバはインストールしておいたほうがいいみたい
firmware-realtekってのがnon-freeにあったからaptで入る
参考リンク
http://cskimura.blogspot.jp/2010/06/rtl81118168b-on-debian.html
firmware-realtekってのがnon-freeにあったからaptで入る
ethtool -i eth0 lspci | grep Realtek
参考リンク
http://cskimura.blogspot.jp/2010/06/rtl81118168b-on-debian.html
2013年8月18日日曜日
2013年8月5日月曜日
sshでchrootされたsftp専用アカウントの作り方
sshd_configを編集する
注意点としてはsftpuserは/home/chrootに書き込み権限を持たせないこと
そうしないとうまくいかない
Match User sftpuser
AllowTcpForwarding no
ChrootDirectory /home/chroot
ForceCommand internal-sftp
PasswordAuthentication yes
X11Forwarding no
注意点としてはsftpuserは/home/chrootに書き込み権限を持たせないこと
そうしないとうまくいかない
2013年7月29日月曜日
2013年7月18日木曜日
登録:
投稿 (Atom)