LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-15-2018, 08:09 PM   #1
Kaladin
LQ Newbie
 
Registered: Jun 2018
Posts: 2

Rep: Reputation: Disabled
Raspberry pi Samba sources


What do I need to feed apt-get install to get the correct Samba sources to match my Raspberry Pi?

Short summary: I have a COTS NAS running Linux exporting Public/foo. I have a raspberry pi where I'm trying to mount //NAS/Public/foo to /media/foo. Mount gives "Invalid argument". smbclient //NAS/Public/foo /media/foo gives NT_STATUS_BAD_NETWORK_NAME. Wireshark (running on the pi) doesn't show anything going from the pi to the NAS. None of the log files on the NAS change when I try the mount. I've used smbcontrol pid debug 10, everything looks good until NT_STATUS_BAD_NETWORK_NAME suddenly shows up. I can use foo on my Windows boxes.

I'm an experienced Linux user, the problem is not directory permissions, nor a firewall. I've spent a good 30 hours on this and I'm at the end of my rope.

I want to run gdb on samba itself, which means I need to build it with the -g option. After apt-get update and apt-get upgrade I have the following installed:

samba/stable,now 2:4.5.12+dfsg-2+deb9u2 armhf [installed]
samba-common/stable,now 2:4.5.12+dfsg-2+deb9u2 all [installed,automatic]
samba-common-bin/stable,now 2:4.5.12+dfsg-2+deb9u2 armhf [installed,automatic]
samba-dsdb-modules/stable,now 2:4.5.12+dfsg-2+deb9u2 armhf [installed,automatic]
samba-libs/stable,now 2:4.5.12+dfsg-2+deb9u2 armhf [installed,automatic]
samba-vfs-modules/stable,now 2:4.5.12+dfsg-2+deb9u2 armhf [installed,automatic]
libsmbclient/stable,now 2:4.5.12+dfsg-2+deb9u2 armhf [installed,automatic]
smbclient/stable,now 2:4.5.12+dfsg-2+deb9u2 armhf [installed]

smbclient says I have Samba 3.6.5 installed. Samba.org says the latest is 4.8.2. Not seeing sources to 3.6.5.

What do I need to feed apt-get install to get the correct Samba sources to match my Raspberry Pi? Yeah, I know whatever I build will now be "my current samba". I want sources that are known to work on the pi, namely the source to the binaries already installed.

ps. Just realized the binaries already installed are not known to work, they're just known to run But you know what I mean.

Last edited by Kaladin; 06-15-2018 at 08:17 PM.
 
Old 06-16-2018, 06:48 AM   #2
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
My apologies if I give an asnwer to something you don't ask.

You say:
Code:
smbclient //NAS/Public/foo /media/foo
gives an error. But this command is not the command to mount an SMB share on /media/foo. Smbclient only takes ONE parameter, the first one. And it drops you in an smb shell.

It is correct wireshark does not show anything. The smbclient never executes beyond the syntax check.

Too mount (what you intend) you use:
Code:
mount -t cifs -o username=samba-user //NAS/Public/foo /media/foo
I think your error message is because you use /media/foo which is not an SMB file system. Beware I did not test the posted mount command.But at least your error should be different. And if you get an error, double-check my proposed syntax.

jlinkels
 
Old 06-16-2018, 09:34 AM   #3
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Put a line in /etc/apt/sources.list that begins with 'deb-src'. Then do
Code:
$ apt-get source <package>
That will download and unpack the source package in the current directory.
 
Old 06-16-2018, 02:20 PM   #4
Kaladin
LQ Newbie
 
Registered: Jun 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
You are correct, I wasted hours due to faulty instructions. Thanks Google!

Still can't mount that stupid share though
 
Old 06-16-2018, 03:21 PM   #5
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
I must admit that I cannot connect to a Windows share from my Raspi either.

Code:
jlinkels@raspberrypi:~$ smbclient -U jlinkels //w7/Users/
WARNING: The "syslog" option is deprecated
Enter jlinkels's password: 
Connection to w7 failed (Error NT_STATUS_IO_TIMEOUT)
jlinkels@raspberrypi:~$
SMBClient is version 4.5.12-Debian

While connecting from my desktop machine running Jessie it is no problem.
SMBClient is version 4.1.17-Debian

jlinkels
 
Old 06-18-2018, 03:36 PM   #6
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Hi to all on this thread,

Just in case this may be part of the issue, especially since we're talking connecting linux and Windows through samba : check the version of the smb protocol being used. I ran into similar issues not long ago when updated versions of samba on linux changed the default version of smb it used and it wasn't compatible with what the Windows OS was expecting.

There is a mount option (both for command line and fstab mounting) that specifies the version of the smb protocol to use - that solved my problem.
 
Old 06-18-2018, 04:43 PM   #7
jlinkels
LQ Guru
 
Registered: Oct 2003
Location: Bonaire, Leeuwarden
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195

Rep: Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043Reputation: 1043
That is very useful post, thank you.

However, it doesn't make any difference. SMBClient still does not work, and I miss the option to specify a version anyway.

However, the mount command simply works.
Code:
jlinkels@raspberrypi:~$ sudo mount -t cifs -o user=jlinkels //192.168.110.104/Users/ /mnt/w7/
Password for jlinkels@//192.168.110.104/Users/:  ***********
Even without the type and version:
Code:
jlinkels@raspberrypi:~$ sudo mount  -o user=jlinkels //192.168.110.104/Users/ /mnt/w7/
Password for jlinkels@//192.168.110.104/Users/:  ***********
I don't understand why I stopped testing at the SMBClient and did not try the mount command.

BTW, I double-checked and this is Stretch. Kernel 4.14.34-v7+.

jlinkels

Last edited by jlinkels; 06-18-2018 at 04:47 PM.
 
Old 06-19-2018, 06:58 AM   #8
Rickkkk
Senior Member
 
Registered: Dec 2014
Location: Montreal, Quebec and Dartmouth, Nova Scotia CANADA
Distribution: Arch, AntiX, ArtiX
Posts: 1,364

Rep: Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511Reputation: 511
Quote:
Originally Posted by jlinkels View Post
That is very useful post, thank you.

However, it doesn't make any difference. SMBClient still does not work, and I miss the option to specify a version anyway.

However, the mount command simply works.

I don't understand why I stopped testing at the SMBClient and did not try the mount command.

BTW, I double-checked and this is Stretch. Kernel 4.14.34-v7+.

jlinkels
Hi jlinkels,

I admit to actually *never* having used the smbclient option. I always just mount the shares - mostly through fstab and at the command line as needed.

Cheers :-)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: New Raspberry Pi 3B+, Infection Monkey, Samba Password Bug, Facebook's Profilo and More LXer Syndicated Linux News 0 03-15-2018 05:42 AM
Unable to authenticate on Samba - Raspberry Pi mujs Linux - Networking 2 08-17-2015 05:01 AM
Raspberry Pi and Samba JudasRose Linux - Server 14 07-20-2014 01:25 AM
Ubuntu Sources List! I need some great sources lists! Jengo Linux - Newbie 1 06-24-2005 04:50 PM
Software Sources Manager, how to add installation cd sources after deletion Lakota Mandriva 1 10-23-2003 12:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration