回答にはwinexeを使用する必要があります。
私は、次のコマンドを使用して、winexe (Linux 上) を使用してリモート Windows 7 に Samba 共有をマウントしています。
./bin/winexe -U <user>%<password> //<ip> "cmd.exe /c net use x: \\<ip>\share <password> /user:<user>"
これにより、次のようになります。
System error 67 has occurred. The network name cannot be found.
しかし、私がこれをすると:
./bin/winexe -U <user>%<password> //<ip> "cmd.exe"
そして、Linuxマシンで表示されるコマンドラインプロンプトに入力を続けます
"net use x: \\<ip>\share <password> /user:<user>""
問題なく動作します。これを最初のコマンドのように 1 行で動作させるにはどうすればよいですか?
答え1
Linuxではこのようなことを試すことができます
mount -t cifs -o username=your_name,password=your_pass //192.168.1.1/shared_path /mnt/mount_point
答え2
Zoredache の提案どおり、文字\
をエスケープする必要がありました。
正しいコマンドは次のようになります。
./bin/winexe -U <username>%<password> //<ip> "cmd.exe /c net use x: \\\\<ip>\\share /user:<user> <password>"