Bash smbclient中的Shell脚本?
我在smbclient内执行shell(bash)脚本时遇到问题 看起来是这样的:Bash smbclient中的Shell脚本?,bash,shell,smb,Bash,Shell,Smb,我在smbclient内执行shell(bash)脚本时遇到问题 看起来是这样的: rafal@amilo:~/Desktop$ rafal@amilo:~/Desktop$ #script.sh is here rafal@amilo:~/Desktop$ rafal@amilo: smbclient //host/user -U user%password smb: \> smb: \> #do some automatic things here: execute scri
rafal@amilo:~/Desktop$
rafal@amilo:~/Desktop$ #script.sh is here
rafal@amilo:~/Desktop$
rafal@amilo: smbclient //host/user -U user%password
smb: \>
smb: \> #do some automatic things here: execute script.sh from rafal@amilo
smb: \>
smb: \>exit
rafal@amilo:~/Desktop$ #now i have new files in Desktop
我如何才能让它工作?smbclient允许您进入samba目录。如果目标服务器是Windows,您将无法(轻松地)运行“bash脚本”,但无法使用专用工具运行“批处理脚本”。 例如,您可以使用WinExec()或SMBMap()
这些工具的行为与Sysinternals中的PsExec相同。选项允许您指定应在smb外壳内“执行”的命令。您是对的,它可以工作:smbclient//host/user-U user%password-c command1;命令2;命令3;。。。