2009年9月26日土曜日

samba

Synapticでsambaをインストール
libpam-smbpassもインストール
pluggable authentication module for Samba
This is a module for PAM that enables a system administrator to migrate
user passwords from the Unix password database to the SMB password
database as used by Samba, and to subsequently keep the two databases in
sync. Unlike other solutions, it does this without needing users to log
in to Samba using cleartext passwords, or requiring them to change their
existing passwords.

sudo chown nobody:nogroup /home/pub
sudo chmod 777 /home/pub


/etc/samba/smb.conf を編集

workgroup = HOME
dos charset = CP932
unix charset = UTF-8
display charset = UTF-8
map to guest = Bad User

server string = %h (Samba, Ubuntu)

security = user

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
printing = cups
printcap name = cups

[homes]
comment = Home Directories
browseable = no
read only = no

[pub]
comment = Share Directories
path = /home/pub
hosts allow = 192.168.0. 127.
quest ok = no
writable = yes


sudo /etc/init.d/samba restart

CUPSの設定
メニューから システム管理>印刷
プリンタ設定のメニューから サーバ>設定
共有プリンタの公開にチェック
インターネットからの印刷は許可しない

/etc/cups/mime.convs を local.convs として保存し(Originalを残して)
以下の行のコメントアウトをはずす。
#application/octet-stream application/vnd.cups-raw 0

これで無事にWindowsから印刷できました。
簡単です。

Convmv

Vineの文字コードはEUCでUbuntuはUTF-8。文字コードが異なるため、Ubuntuに用意されているconvmv コマンドで、ファイル名をEUCからUTF-8に変更する。このコマンドはファイルの中味のコードは変えない。

まず、convmvをsynapticdでインストール

VineのHomeDirectoryをマウントして、テストしたのち、
sudo convmv -r -f euc-jp -t utf8 /mnt/new/koichi_backup/* --notest
無事に変換されました。必要なファイルを新しいHomeにCopy!