LANDISKとのsmbmount

文字化けした。
まず、Debian 4.0 (etch)はUTF-8。一方、ファイルサーバであるLANDISKはWindows文字コードであるcp932。
なので以下のようにコードを明示してやる。

degas@debian:~$ sudo mount -t smbfs -o username=common,codepage=cp932,iocharset=utf8 //192.168.100.101/share /mnt/nas_share

または

degas@debian:~$ sudo smbmount //192.168.100.101/share /mnt/nas_share -o username=common,codepage=cp932,iocharset=utf8

と入力し、ファイルサーバのパスワードを入力すればマウントできる。
なお、-o以下は後ろに入れないとダメらしい。エラーが出た。

degas@debian:~$ sudo smbmount -o username=common,codepage=cp932,iocharset=utf8 //192.168.100.101/share /mnt/nas_share
Usage: mount.smbfs service mountpoint [-n] [-o options,...]
Version 3.0.24

Options:
      username=<arg>                  SMB username
      password=<arg>                  SMB password
      credentials=<filename>          file with username/password
      krb                             use kerberos (active directory)
      netbiosname=<arg>               source NetBIOS name
      uid=<arg>                       mount uid or username
      gid=<arg>                       mount gid or groupname
      port=<arg>                      remote SMB port number
      fmask=<arg>                     file umask
      dmask=<arg>                     directory umask
      debug=<arg>                     debug level
      ip=<arg>                        destination host or IP address
      workgroup=<arg>                 workgroup on destination
      sockopt=<arg>                   TCP socket options
      scope=<arg>                     NetBIOS scope
      iocharset=<arg>                 Linux charset (iso8859-1, utf8)
      codepage=<arg>                  server codepage (cp850)
      unicode                         use unicode when communicating with server
      lfs                             large file system support
      ttl=<arg>                       dircache time to live
      guest                           don't prompt for a password
      ro                              mount read-only
      rw                              mount read-write

This command is designed to be run from within /bin/mount by giving
the option '-t smbfs'. For example:
  mount -t smbfs -o username=tridge,password=foobar //fjall/test /data/test