2013年 05月 23日
How to reset SUSE+XEN DomU root password ?
Using config file "./myvm". <-- xm create -c /etc/xen/vm/myvm extra=" single"もOK
Started domain myvm (id=26)
xen-host:/etc/xen/vm # xm console myvm
[ 0.000000] Initializing cgroup subsys cpuset
: 中略
[ 3.757901] kjournald starting. Commit interval 15 seconds
[ 3.757971] EXT3-fs (xvda2): using internal journal
[ 3.758025] EXT3-fs (xvda2): mounted filesystem with ordered data mode
Give root password for maintenance
(or type Control-D to continue):
Login incorrect.
Give root password for maintenance
(or type Control-D to continue): sulogin: read(/dev/xvc0): Operation not permitted
oooop ! どうすりゃいいのだ?
Give root password for maintenance
(or type Control-D to continue):
Orz.....
There is the other way to reset XEN guest root's password ....
Continue... I'm sorry of this discription is written by Japanese, If you need, Please Translate link.
2013年 05月 23日
Windows 2008 はデフォルトでマスタブラウザがオフ
そのため、エクスプローラから「ネットワーク」を開いても、正しい情報が出ない場合があります。これは、最新のサーバを導入したにもかかわらず、Windows サーバがマスタブラウザとして機能を発揮しないため、その他の Windows 7 なり XP なりが自動的にマスタブラウザとしてネットワークの情報を保持してしまうことになるわけです(たぶん)
Windows 2008 をマスタブラウザーとするには
-「サービス」の"Computer Browser"を有効にして起動
- [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Browser\Parameters] > "MaintainServerList"="Auto" から Yes に
target="_blank">http://technet.microsoft.com/ja-jp/library/cc722044(v=ws.10).aspx

に設定しておけば、必ず Windows 2008 がマスタブラウザとなるため古いコンピュータやデスクトップPCが勝手にマスタブラウザになるということが防げるはず、ということになります。
これ以前の Windows XP/2003 系は「自動」で Auto なので、マスタブラウザが Auto (勝手に)切り替わってしまうため、マスタブラウザが「どれ」なのかは nbtstat コマンドで一々調べるしかありません。
ちなみに Windows 7 では”Computer Browser”のサービスは「手動」ですが「開始」されています。おそらく、エクスプローラの「ネットワーク」を開いたときに勝手に起動するようになっていると想像しています。
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Browser\Parameters]
のデフォルトではキーもありませんでした。おそらく、これも推測ですが、 Windows 7 がマスタブラウザーとなったときに勝手につくられるのかもしれません。
私は SUSE Linux で Samba を使っているので、これをマスタブラウザとしています。
Windows 7 ネットワークに表示されない - SUSE + samba で解決する。
islandcenter.jp
2013年 05月 10日
XEN 仮想VMの(DomU) root パスワードのリセット SUSE 11.2 編
Translate English excite
--
しばらく使っていなかった XEN の仮想 domU に root ログインできなくなりました。私はパスワード変えた記憶はありません。私には結局この方法が一番簡単でした。
-ヒントとなったフォーラムの書き込み-
https://forums.suse.com/archive/index.php/t-761.html
そうか kernel に ' init=/bin/bash ' を渡せばいいんだ。ということで
まず Original の vm ファイルを確認
xen-dom0:/etc/xen/vm # cat my-domu
name="my-domu"
description="None"
uuid="d780c050-b4f8-323c-04a8-fe8f9a7438d6"
memory=512
maxmem=512
vcpus=2
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=0
keymap="ja"
builder="linux"
bootloader="/usr/bin/pygrub"
bootargs=""
extra=" "
disk=[ 'file:/var/lib/xen/images/my-domu/my-domu.disk0.raw,xvda,w'', ]
vif=[ 'mac=00:16:3e:22:01:99,bridge=br0', ]
vfb=['type=vnc,vncunused=1']
extra=" " の部分が空欄(space)になっています。
vmファイルをコピーして
xen-dom0:/etc/xen/vm # cp my-domu my-domu-rescue
vi で編集しました。extra=" " の部分を extra=" init=/bin/bash" とします。init の前space が入っています。
# xm create my-domu extra=1 あるいは =single
と実行してもシングルユーザモード(runlevel:1)で起動できるのですが、それでも root のパスワードが求められます。これは他のディストリビューションではあまりないことのようです。
- orz begin -
xen-host:/etc/xen/vm # xm create myvm extra=" single"
Using config file "./myvm". <-- xm create -c /etc/xen/vm/myvm extra=" single"もOK
Started domain myvm (id=26)
xen-host:/etc/xen/vm # xm console myvm
[ 0.000000] Initializing cgroup subsys cpuset
: 中略
[ 3.757901] kjournald starting. Commit interval 15 seconds
[ 3.757971] EXT3-fs (xvda2): using internal journal
[ 3.758025] EXT3-fs (xvda2): mounted filesystem with ordered data mode Give root password for maintenance
(or type Control-D to continue):
Login incorrect.
Give root password for maintenance
(or type Control-D to continue): sulogin: read(/dev/xvc0): Operation not permitted
Give root password for maintenance
(or type Control-D to continue):
-- endof ooops! orz---
そこで extra" /bin/bash" オプションで起動します。
xen-dom0:/etc/xen/vm # cat my-domu-rescue
name="my-domu"
description="None"
uuid="d780c050-b4f8-323c-04a8-fe8f9a7438d6"
memory=512
maxmem=512
vcpus=2
on_poweroff="destroy"
on_reboot="restart"
on_crash="destroy"
localtime=0
keymap="ja"
builder="linux"
bootloader="/usr/bin/pygrub"
bootargs=""
extra=" init=/bin/bash" <--- ※init の前にスペースが入っています。
disk=[ 'file:/var/lib/xen/images/my-domu/my-domu.disk0.raw,xvda,w'', ]
vif=[ 'mac=00:16:3e:22:01:99,bridge=br0', ]
vfb=['type=vnc,vncunused=1']
xen-dom0:/etc/xen/vm #
編集した vm ファイルを -c オプションで起動します。
xen-dom0:/etc/xen/vm # xm create -c my-domu-rescue
Using config file "./my-domu-rescue".
: 中略
xen-dom0:/etc/xen/vm #
なんとか起動できたので passwd コマンドで root password を変更(reset)します。
※ /etc/shadow の root のハッシュを消してもだめでした。

xm console ではここまで画面が出ないので YaST2 > Virt-Manager のスクリーンから操作します。
ここから halt 出来ればよいのですが halt できない(なぜ?)ので xm destroy my-domu しました。
元の vm ファイルで起動します。
xen-dom0:/etc/xen/vm # xm create my-domu
Using config file "./my-domu".
Started domain my-domu (id=23)
xm console で接続します。
xen-dom0:/etc/xen/vm # xm console my-domu
: 中略
Welcome to SUSE Linux Enterprise Server 11 SP2 (x86_64) - Kernel 3.0.13-0.27-xen (xvc0).
my-domu login: root
Password: reset-password
Last login: Fri May 10 19:03:06 JST 2013 on xvc0
You have new mail.
Directory: /root
Fri May 10 19:09:34 JST 2013
my-domu:~ #
ログインできました。
こちらでは SUSE 10 でのレスキューモードでの起動方法が書かれていますが、 x64 版ではうまく動きませんでした。 i586 版は手元にないので、ただいまダウンロード中です。
XEN: How to boot SLES para-virtual DomU's into the Rescue System for disaster recovery
待てないので色々いじくっていると直りました。
islandcenter.jp
-keyword-
SUSE SLES 11 sp2 How to reset xen gest root password 仮想化 パスワードリセット()
2013年 05月 03日
How to install OCS inventory NG on SUSE 11
-Warning - This is my failure case !!!!! うまく動きませんでした。失敗例です。-
- XEN Virtualized Machine
- Keybord: Japan
- Time zone Asia/Japan
- Runlevel : 3
- Addon Software : Web/Lamp
- Static IP Address
- Fire Wall Disabled
- ipV6 Disabled
- NTP Configured by startup
- Default Software Repositories --> My HTTP:server/sles11sp2
-HTTP-
Yast > Network Service > Http server

You may install as it is but ddon't forget "Enable Perl" check box.

-1 Click Install-
open "http://software.opensuse.org" > Search "ocsinventory".

As it goes.. Continue...
If there is some dependency problem, Click "Breake.... and Try again".

-Check Prerequirement-
http://wiki.ocsinventory-ng.org/index.php/Documentation:Server
Requirements.
-Apache version 1.3.33 or higher / Apache version 2.0.46 or higher.
-Mod_perl version 1.29 or higher.
-Mod_php version 4.3.2 or higher.
-PHP 4.3.2 or higher, with ZIP and GD support enabled.
-PERL 5.6 or higher.
--Perl module XML::Simple version 2.12 or higher.
--Perl module
--Perl module DBI version 1.40 or higher.
--Perl module DBD::Mysql version 2.9004 or higher.
--Perl module Apache::DBI version 0.93 or higher.
--Perl module Net::IP version 1.21 or higher.
--Perl module SOAP::Lite version 0.66 or higher (optional)
-MySQL version 4.1.0 or higher with InnoDB engine active.
-Make utility such as GNU make.
-Install Perl CPAN Modules-
CPAN modules
These command spend a few minutes for download and make install. You may asked intervew and install by answer 'yes' to continue.
/usr/bin/perl -MCPAN -e 'install XML::Simple'
or
/usr/bin/cpan -i XML::Simple
:
:
also continue... to 'install DBI', 'install DBD::Mysql', 'install Apache::DBI', 'install Net::IP', 'install::SOAP::Lite'. It is CASE SENSITIVE.
-Apache and Mysql startup-
yast > System > Service(run level) E(x)pert.

Select 'mysql', set and start.
-Restart Apache2-
ocsinv:~ # /etc/init.d/apache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done
ocsinv:~ # tail /var/log/apache2/error_log
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
[Thu May 02 16:46:34 2013] [notice] Apache/2.2.12 (Linux/SUSE) PHP/5.2.14 with Suhosin-Patch mod_perl/2.0.4 Perl/v5.10.0 configured -- resuming normal operations
ocsinv:~ #
-mysql root passwrod-
ocsinv:~ # mysqladmin -u root PASSWORD new-password
-Begin Install-
open browser
http://myocsinv.myintra/ocsreports/install.php

set 'root'/'new-password' and 'hostname'(as localhost) field.

It seems run well...

Check Database
ocsinv:~ # mysql -u root -p
Enter password: new-password
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 20
Server version: 5.0.95 SUSE MySQL RPM
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| ocsweb |
| test |
+--------------------+
4 rows in set (0.00 sec)
mysql> quit
Bye
ocsinv:~ #
-Open Browser-
http://ocsinv.intra/ocsreports/
Change Lanugage by clicking English Flag if you want.
login admin/admin (Default by OCS)

It seem work well.

-TimeZone-
ocsinv:/etc/php5/apache2 # grep zone php.ini
; Defines the default timezone used by the date functions
;date.timezone =
date.timezone = Asia/Tokyo <---- replace this line
ocsinv:/etc/php5/apache2 # rcapache2 restart
Syntax OK
Shutting down httpd2 (waiting for all children to terminate) done
Starting httpd2 (prefork) done
ocsinv:/etc/php5/apache2 #
-Warning - This is my failure case !!!!! -
Where is communication server ? It's not work..... (/_'_/)~~!/ baaann...
Commication Server が必要。レポート機能だけで何にもできない。 orz....