# download samba file from command line (where is smbget in samba4?)



## kenorb (Nov 1, 2010)

In samba3 there was a tool called: smbget
I can't see it in recent samba4

```
pkg_info | grep samba
samba34-libsmbclient-3.4.9 Shared libs from the samba package
samba4-devel-4.0.0.a11_1 A free SMB and CIFS client and server for UNIX
```

Some of my scripts rely on that command.

I can't install samba3, because there is conflict with samba4, which is dependent by other package.

Question:
How I can back to smbget or which alternative command line I could use instead?


----------



## kenorb (Nov 1, 2010)

```
> grep smbget /usr/ports/net/*/pkg-plist
/usr/ports/net/samba34/pkg-plist:bin/smbget
/usr/ports/net/samba35/pkg-plist:bin/smbget
```


----------



## SirDice (Nov 1, 2010)

Remove samba4. Recompile the parts of Gnome that depend on it (turn MAPI support off). Then you can safely install and use samba34.


----------



## kenorb (Nov 1, 2010)

Do you know why it was removed from samba4? Why removing good and common used things in the new version?


----------



## kenorb (Nov 1, 2010)

I don't want to downgrade my packages and compile the gnome by removing dependencies, only because somebody decided to remove some simple binary.
I want to follow the new version and find the proper solution.
http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg619303.html

Probably this is the one:

```
> man smbclient
No manual entry for smbclient
> smbclient smb://192.168.20.40/public/dbsdrop/doc-incoming/doc-01.sql.gz
Connection to \\(null)\smb:\\192.168.20.40\public\dbsdrop\doc-incoming\doc-01.sql.gz failed - NT_STATUS_NO_MEMORY
```
But it would be good when it will work user-friendly way.


----------



## kenorb (Nov 1, 2010)

Found it

Samba4

```
> smbclient -N -d2 //192.168.20.40/public -c "cd dbsdrop/doc-incoming; get doc-01.sql.gz"
added interface ip=192.168.14.38 nmask=255.255.255.0
added interface ip=192.168.14.38 nmask=255.255.255.0
getting file \dbsdrop\doc-incoming\doc-01.sql.gz of size 63849525 as doc-01.sql.gz (7329.6 kb/s) (average 7329.6 kb/s)
```

Samba3:

```
smbget -a "smb://192.168.20.40/public/dbsdrop/doc-incoming/doc-01.sql.gz"
```

Sorry, but for me it's the most stupid thing that somebody changed into "better" in the new version;/


----------

