Bug 8400 - You don't have enough permissions to access smb://...
Summary: You don't have enough permissions to access smb://...
Status: RESOLVED DUPLICATE of bug 6482
Alias: None
Product: Samba 3.5
Classification: Unclassified
Component: Client Tools (show other bugs)
Version: 3.5.8
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: Volker Lendecke
QA Contact: Samba QA Contact
Depends on:
Reported: 2011-08-25 03:19 UTC by jort.bloem
Modified: 2015-12-30 22:32 UTC (History)
0 users

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description jort.bloem 2011-08-25 03:19:57 UTC
This took me all morning to find, and I don't want my time to go to waste.

If you use 
smbget -R -u $user -p $password smb://$ip/$share/ 

and do NOT have the environment variable USER set, (as you won't when running from cron),  then you will get an error "You don't have enough permissions to access smb://$ip/$share/$filename" for every file. If you have the USER variable set, it works perfectly.

Note that I *am* specifying the username in the commandline, so I can't see any reason to need this environment variable.

Discovered in 3.4.0, still an issue in 3.5.8

Things that work/fail:

Getting one file without -R works, WITH -R getting a single file OR a directory fails.

With the environment variable USER=root works, WITHOUT the environment variable it fails. 

This works:
Domain=[NAS] OS=[Unix] Server=[Samba 3.5.2]

This fails:
Domain=[BTG] OS=[Windows Server 2003 3790 Service Pack 1] Server=[Windows Server 2003 5.2]

Thanks & greets to BaT in #samba-technical for reminding me to check it on a more recent version of smbget.
Comment 1 Bastiaan 2015-08-27 09:52:27 UTC
Looks like a duplicate of https://bugzilla.samba.org/show_bug.cgi?id=6482.

Embedding username:password@ into the smb URL seems to be working.
Comment 2 Christian Ambach 2015-12-30 22:32:48 UTC

*** This bug has been marked as a duplicate of bug 6482 ***