The Samba-Bugzilla – Bug 2613
smbsh to pass shell command line #! shebang (proposed code)
Last modified: 2007-01-18 08:07:47 UTC
It would be very useful to be able to pass shell commands on the smbsh command
line. This has two main advantages:
1) No need to enter an interactive smbsh shell to execute scripts which access
2) Possible to run cron jobs which access windows files
and a neat side-effect: You can create shebang scripts which use the smbsh
facilities. e.g. trite example:
#! /usr/local/samba/bin/smbsh -Uuser%password --
ls -l /smb
$ smbsh -- -c "ls -l /smb"
dr-xr-xr-x 2 cmsdev cmsdev 0 Jan 1 1970 KPGB
dr-xr-xr-x 2 cmsdev cmsdev 0 Jan 1 1970 PACEGB
The attachment contains the proposed code which works for Solaris and I suspect
is trivial enough to work for any *nix.
Created attachment 1158 [details]
Patch for smbsh to pass command line options to the shell
smbsh has been dropped from the tree due to lack of a maintainer.
Thanks for the patch though.