Bug 2613 - smbsh to pass shell command line #! shebang (proposed code)
Summary: smbsh to pass shell command line #! shebang (proposed code)
Status: RESOLVED WONTFIX
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.0.13
Hardware: All All
: P3 enhancement
Target Milestone: none
Assignee: Samba Bugzilla Account
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-14 10:57 UTC by Julian Bridle
Modified: 2007-01-18 08:07 UTC (History)
0 users

See Also:


Attachments
Patch for smbsh to pass command line options to the shell (554 bytes, patch)
2005-04-14 10:59 UTC, Julian Bridle
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Bridle 2005-04-14 10:57:08 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 
windows files
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

or semi-interactive

$ smbsh -- -c "ls -l /smb"
Username: julian
Password: 

total 0
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.
Comment 1 Julian Bridle 2005-04-14 10:59:19 UTC
Created attachment 1158 [details]
Patch for smbsh to pass command line options to the shell
Comment 2 Gerald (Jerry) Carter (dead mail address) 2007-01-18 08:07:47 UTC
smbsh has been dropped from the tree due to lack of a maintainer.
Thanks for the patch though.