LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-01-2010, 08:59 AM   #1
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Rep: Reputation: 30
Unhappy Share files with Samba. How?


I gave up trying to get Samba to work in Debian. After doing some research I decided to install Ubuntu thinking it might work.

Ubuntu 9.10 loaded just fine and I could access the Internet. However, I still could not see any of the Windows systems on the local network and they couldn't see the Ubuntu system.

I only have a simple 4-system local peer-to-peer network connected through an 8 port switch. There is no actual server. The DHCP is handled by a router.

So, why can't the Linux Samba see the other systems and why can't they see the Linux system?

It can't be that hard to share files between these computers.

Thanks
 
Old 03-01-2010, 09:12 AM   #2
ImChipBrown
LQ Newbie
 
Registered: Mar 2008
Distribution: Ubuntu 8.04
Posts: 7

Rep: Reputation: 0
Have you got your domain name set up properly? On my peer-to-peer network, this is the Workgroup name.
 
Old 03-01-2010, 05:49 PM   #3
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Original Poster
Rep: Reputation: 30
The Workgroup is set-up and working for my Windows 2000, XP, and even Vista systems. Yet, I have been unsuccessful in my attempts, for about a year now, to get file sharing set-up with Samba on a Linux system.

I have some posts in Debian. After I got Samba almost working in Debian, Debian trashed my Login profiles. So, I thought I would try Ubuntu.

Thanks
 
Old 03-02-2010, 09:38 AM   #4
ImChipBrown
LQ Newbie
 
Registered: Mar 2008
Distribution: Ubuntu 8.04
Posts: 7

Rep: Reputation: 0
Are you (Linux machine) getting assigned an IP address from the DHCP router? Can you ping any of the Windoze machines?

For whatever reason, the first thing I always get is internet access. The Lan is always the tricky bit.

What I meant to ask is "Does your Samba config file have a workgroup = " setting? My setting is in /etc/samba/smb.conf
 
Old 03-02-2010, 10:26 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Could you post the results of `nmbstatus'?

Also try "nmblookup <host1> <host2>" with the names of the hosts you have on the lan.

This should list the shares offered.
smbclient -L <hostname>

Check that smbd and nmbd are running:
ps -e | egrep mbd

Check the ports. Remember udp as well.
Code:
netstat -ln | egrep  ':(137|138|139|445)'
tcp        0      0 :::139                  :::*                    LISTEN
tcp        0      0 :::445                  :::*                    LISTEN
udp        0      0 192.168.1.106:137       0.0.0.0:*
udp        0      0 0.0.0.0:137             0.0.0.0:*
udp        0      0 192.168.1.106:138       0.0.0.0:*
udp        0      0 0.0.0.0:138             0.0.0.0:*
Check you firewall settings. You want to open 137/udp, 138/udp, 139/tcp and 445/tcp.
Code:
PORT    STATE         SERVICE
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm

139/tcp open   netbios-ssn                                    
445/tcp open   microsoft-ds
 
Old 03-03-2010, 07:09 AM   #6
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Original Poster
Rep: Reputation: 30
Question

Quote:
Originally Posted by ImChipBrown View Post
Are you (Linux machine) getting assigned an IP address from the DHCP router? Can you ping any of the Windoze machines?

For whatever reason, the first thing I always get is internet access. The Lan is always the tricky bit.

What I meant to ask is "Does your Samba config file have a workgroup = " setting? My setting is in /etc/samba/smb.conf
I can ping the other work stations.

I can not find any way to access the smb.conf file in Ubuntu. Ubuntu blocks me from access any system files or root commands.
 
Old 03-03-2010, 07:27 AM   #7
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Original Poster
Rep: Reputation: 30
jschiwal;3882753Could you post the results of `nmbstatus'?
***************************************
I get: ande@ubuntu1:~$ nmbstatus
No command 'nmbstatus' found, did you mean:
Command 'smbstatus' from package 'samba4' (universe)
Command 'smbstatus' from package 'samba' (main)
nmbstatus: command not found
ande@ubuntu1:~$ smbstatus
The program 'smbstatus' can be found in the following packages:
* samba
* samba4
Try: sudo apt-get install <selected package>
smbstatus: command not found
*****************************************

Also try "nmblookup <host1> <host2>" with the names of the hosts you have on the lan.
***************************************
I get: ande@ubuntu1:~$ nmblookup redone alive
querying redone on 192.168.11.255
192.168.11.6 redone<00>
querying alive on 192.168.11.255
192.168.11.4 alive<00>
169.254.2.2 alive<00>
****************************************

This should list the shares offered.
smbclient -L <hostname>
***************************************
I get: ande@ubuntu1:~$ smbclient -L ubuntu1
Enter ande's password:
Connection to ubuntu1 failed (Error NT_STATUS_CONNECTION_REFUSED)
***************************************

Check that smbd and nmbd are running:
ps -e | egrep mbd
***************************************
I get nothing as shown:
ande@ubuntu1:~$ ps -e | egrep mbd
ande@ubuntu1:~$ ps -e | egrep nmbd
ande@ubuntu1:~$ ps -e | egrep smbd
***************************************

Check the ports. Remember udp as well.
Code:
netstat -ln | egrep  ':(137|138|139|445)'
tcp        0      0 :::139                  :::*                    LISTEN
tcp        0      0 :::445                  :::*                    LISTEN
udp        0      0 192.168.1.106:137       0.0.0.0:*
udp        0      0 0.0.0.0:137             0.0.0.0:*
udp        0      0 192.168.1.106:138       0.0.0.0:*
udp        0      0 0.0.0.0:138             0.0.0.0:*
*****************************************
I get nothing.
ande@ubuntu1:~$ netstat -ln | egrep '137|138|139|445)'
ande@ubuntu1:~$
*****************************************

Check you firewall settings. You want to open 137/udp, 138/udp, 139/tcp and 445/tcp.
Code:
PORT    STATE         SERVICE
137/udp open|filtered netbios-ns
138/udp open|filtered netbios-dgm

139/tcp open   netbios-ssn                                    
445/tcp open   microsoft-ds
*********************************
I have no firewall set-up, until I can find a way to actually set-up and use Ubuntu.
***********************************

I tried to set-up a Group in Samba. However, Ubuntu will not allow me access to add a Group. How do I gain access to root in ubuntu? Do I have to do everything from the command line with sudo?

Thanks
 
Old 03-04-2010, 01:39 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You use "sudo" to run commands as root on Ubuntu.

E.G.
sudo vim /etc/samba/smb.conf

My samba-client package includes the `/usr/bin/nmbstatus' program. It returns the name of the workgroup/domain and the members. It needs to be run as root. I.e. "sudo nmbstatus". You can use "smbclient -L <remote_server>" to list the shares on that server.

It seems that the samba services aren't running on Ubuntu1. You also need to deal with the firewall on the other machines as well.
 
Old 03-04-2010, 07:15 AM   #9
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Original Poster
Rep: Reputation: 30
Quote:
You use "sudo" to run commands as root on Ubuntu.
Then Ubuntu is not for me then. If there is no way to login as root and use the GUI tools provided for *nix, then I'll just try another flavor.

Command line should only be used for customization, not required for day-to-day operations and initial set-up.
 
Old 03-04-2010, 08:07 AM   #10
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by AndeAnderson View Post
Then Ubuntu is not for me then. If there is no way to login as root and use the GUI tools provided for *nix, then I'll just try another flavor.
From the terminal you can run
Code:
gksudo gedit /etc/samba/smb.conf
This will ask for your password. Then it will open /etc/samba/smb.conf in the gedit text editor with sudo privileges so you can write to it. Gedit is a graphical text editor similar to notepad in Windows.
Quote:
Originally Posted by AndeAnderson View Post
Command line should only be used for customization, not required for day-to-day operations and initial set-up.
In the long run you would greatly benefit by learning to do these things from the terminal. It is easy to learn. Until then using "gksudo gedit" to edit files will get the job done.

Last edited by tommcd; 03-04-2010 at 08:09 AM.
 
Old 03-05-2010, 05:50 AM   #11
AndeAnderson
Member
 
Registered: Feb 2005
Location: Pennsylvania
Distribution: Debian (maybe)
Posts: 237

Original Poster
Rep: Reputation: 30
Quote:
In the long run you would greatly benefit by learning to do these things from the terminal. It is easy to learn. Until then using "gksudo gedit" to edit files will get the job done.
You are right. However, that will not work with the people, my clients, I am trying to get to switch to Linux and escape the nightmare of MalWare and Viruses. They just barely know how to turn the computer on and use Internet Explorer or MS Office. Even if I install FireFox they won't even try to use it. Most of them now have a desktop and at least one laptop, which they share files and pictures between. When they have a problem I can walk them through it on the phone using the MS GUIs. It's almost impossible to walk them through using the command line. The last time I tried was to do a simple 'ping' of the ComCast servers. That took almost 10 minutes before they got it right.

So far, Linux has been blind to the actual market they say they want to access. If Linux wants to get a larger share of the computer market, they need to realize most home, and small business, owners will not take time to learn how to use the command line to be able to do the simple things, like sharing files, when Microsoft already makes that easy for them. If they have to use the 'scary' command line, they just go back to Microsoft where they don't have to use it.

So, I will continue the search.

Thanks
 
Old 03-05-2010, 07:38 AM   #12
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
Quote:
Originally Posted by AndeAnderson View Post
So far, Linux has been blind to the actual market they say they want to access. If Linux wants to get a larger share of the computer market ...
Ubuntu is one of the more beginner friendly distros out there. I don't use samba, so I have no experience with that. Perhaps these articles from the Ubuntu wiki will help:
https://help.ubuntu.com/community/SettingUpSamba
https://help.ubuntu.com/9.04/serverg...ileserver.html
https://help.ubuntu.com/9.10/serverg...tegration.html
If you decide not to use Ubuntu, then I might suggest trying Mandriva or Suse, as these are both very beginner friendly also, and may have what you need.
 
  


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
How to edit files with xemacs over Samba share? Samba problem? rylan76 Linux - Software 1 11-13-2008 01:00 AM
samba and 2 files share finsh Linux - Server 2 09-16-2008 08:22 AM
Share files using Samba euro2004 Linux - Software 5 01-30-2006 04:54 PM
Cannot create files on samba share jhoderd Linux - Software 2 01-04-2005 08:46 AM
Don't share .files with Samba objorkum Linux - Software 1 02-28-2004 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 10:21 AM.

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