대답은 winexe를 사용해야합니다.
나는 다음 명령을 사용하여 원격 Windows 7에 삼바 공유를 마운트하기 위해 winexe(Linux)를 사용하고 있습니다.
./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
리눅스에서 이와 같은 것을 시도해 볼 수 있습니다
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>"