| 1 | To create "smbsh" on Linux, just type "make".
 | 
|---|
| 2 | 
 | 
|---|
| 3 | If you execute "smbsh" in *this* directory (so that it can find the required
 | 
|---|
| 4 | shared library), you'll find yourself in a new shell.  You can then issue
 | 
|---|
| 5 | commands referencing the "/smb" pseudo-filesystem:
 | 
|---|
| 6 | 
 | 
|---|
| 7 |   ls /smb
 | 
|---|
| 8 |   ls /smb/WORKGROUP_OR_DOMAIN
 | 
|---|
| 9 |   ls /smb/SERVER
 | 
|---|
| 10 |   ls /smb/SERVER/SHARE
 | 
|---|
| 11 |   ls /smb/SERVER/SHARE/PATH
 | 
|---|
| 12 | 
 | 
|---|
| 13 | Note that WORKGROUP_OR_DOMAIN is *not* used other than at that level.  This is
 | 
|---|
| 14 | consistent with the smb:// URI definition.
 | 
|---|
| 15 | 
 | 
|---|
| 16 | Usage:
 | 
|---|
| 17 |   smbsh [-L <path to find smbwrapper.so>]
 | 
|---|
| 18 |         [-p <library to load before smbwrapper.so>]
 | 
|---|
| 19 |         [-a <library to load after smbwrapper.so>]
 | 
|---|
| 20 |         [-d <debug value for libsmbclient>]
 | 
|---|
| 21 |         [-n]                                    (do not ask for username/password)
 | 
|---|
| 22 |         [-W <workgroup>]
 | 
|---|
| 23 |         [-U <username%password]
 | 
|---|
| 24 |         [command]
 | 
|---|
| 25 | 
 | 
|---|
| 26 | So to list the contents of \\MYDESK\C$ where a username (adventure) and password
 | 
|---|
| 27 | (xyzzy) are required, and with smbwrapper.so installed in /usr/share/samba, you
 | 
|---|
| 28 | could try:
 | 
|---|
| 29 | 
 | 
|---|
| 30 |   smbsh -L /usr/share/samba -U adventure%xyzzy ls '/smb/MYDESK/C$'
 | 
|---|
| 31 | 
 | 
|---|
| 32 | (It's a good idea to get in the habit of surrounding windows paths in single
 | 
|---|
| 33 | quotes, since they often contain spaces and other characters that'll give you
 | 
|---|
| 34 | headaches when not escaped.)
 | 
|---|
| 35 | 
 | 
|---|
| 36 | This smbsh seems to work quite well on Linux 2.4 and 2.6.  The biggest problem it
 | 
|---|
| 37 | has is in tracking your current working directory.  I haven't had the time to
 | 
|---|
| 38 | track that down and fix it.
 | 
|---|
| 39 | 
 | 
|---|
| 40 | Derrell Lipman
 | 
|---|