LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-27-2010, 04:16 PM   #1
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Rep: Reputation: 2
samba not working


Hi:


I am trying to share files between my Windows XP machine, ubuntu server, debian server and ubuntu desktop. But mainly between ubuntu server and Windows XP computer.
I also like to learn samba, because I am able to do file sharing now, through a second virtual host on my apache2 server.

I set up and configured samba following the instruction on Online Ubuntu Server Guide. https://help.ubuntu.com/10.04/server...ileserver.html

I am pasting the abbreviated version of my smb.conf file here for you to see.

[global]
workgroup = HOME
server string = %h server (Samba, Ubuntu)
interfaces = 127.0.0.0/, 192.168.1.101/255.255.255.0
map to guest = Bad User
obey pam restrictions = Yes
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 17000
dns proxy = No
wins support = Yes
usershare allow guests = Yes
panic action = /usr/share/samba/panic-action %d

[share]
comment = Ubuntu File Server Share
path = /srv/samba/share
valid users = mansour, Administrator
read only = No
create mask = 0755

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
browsable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers



And this is the result of netstat -tan command:

Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:139 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN
tcp 0 0 192.168.1.101:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:445 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN
tcp6 0 0 :::53 :::* LISTEN
tcp6 0 0 :::22 :::* LISTEN
tcp6 0 0 ::1:631 :::* LISTEN
tcp6 0 0 ::1:953 :::* LISTEN



And these are the permissions of the share directory.

total 4
drwxrwxrwx 2 nobody nogroup 4096 2010-11-23 13:46 share



I appreciate some help troubleshooting my samba server.


mansour

Last edited by mansour; 11-29-2010 at 03:04 PM.
 
Old 11-27-2010, 11:38 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,943
Blog Entries: 28

Rep: Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357
I have Samba working just fine for me, but I'm not expert. I just bumbled along until I got it working.

I would recommend Samba by Example as a great reference.

This is a shot in the dar, but have you configured the share directories to be shared? This has to be done separately from configuring Samba. I think that, if they are not configured for sharing, Samba cannot share them. The easiest way to do that depends on your distro.

(The link to the online server guide didn't work for me. It came up as https://help.ubuntu.com/10.04/server...ileserver.html. The missing words led to a 404.)
 
Old 11-28-2010, 11:52 AM   #3
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by frankbell View Post
I have Samba working just fine for me, but I'm not expert. I just bumbled along until I got it working.

I would recommend Samba by Example as a great reference.

This is a shot in the dar, but have you configured the share directories to be shared? This has to be done separately from configuring Samba. I think that, if they are not configured for sharing, Samba cannot share them. The easiest way to do that depends on your distro.

(The link to the online server guide didn't work for me. It came up as https://help.ubuntu.com/10.04/server...ileserver.html. The missing words led to a 404.)
Thank you for posting the link "Samba by Example". I will read it through.
But about your question, whether I have configured the share directory to be shared.
Well, there is a /srv/samba/share/ in the smb.conf file, the main samba config file, which is supposed to be the shared directory between server and all other machines, including windows machine.
So obviously I have to make sure any file I want to share, I put under this directory.
Other than that I don't know how to configure the share directory to be shared.

Thank you

mansour
 
Old 11-28-2010, 02:25 PM   #4
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
testparm smb.conf

When I run the debugging command:
root@ubuntu-server:~#testparm smb.conf
Load smb config files from smb.conf
rlimit: rlimit(1024) below minimum windows limit(16384)
server role: ROLE_STANDALONE
press enter to see a dump of your service definitions

Also when I run:
root@ubuntu-server:~# smbpasswd -a root
Can't load /etc/samba/smb.conf - run testparm to debug it
root@ubuntu-server:~#

What could we understand from the outcome of these two commands, about what is wrong with my config file, and how would I fix it?

1) I put \ubuntu-server\home\srv\samba\ in the URL of my Win XP browser.
Windows can not find '\ubuntu-server\home\srv\samba\'.
Check the spelling and try again.

2) I put that in Run: \ubuntu-server\home\srv\samba\
Windows can not find '\ubuntu-server\home\srv\samba\'
Make sure you typed the name correctly, and then try again. To search for a file, click the start button, and then click search.


3) "Map a Network Drive" tool

Drive Z:
Folder: \ubuntu-server\home\srv\samba\

I get:
The drive could not be mapped because no network was found.




mansour

Last edited by mansour; 11-28-2010 at 03:10 PM.
 
Old 11-28-2010, 08:07 PM   #5
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,943
Blog Entries: 28

Rep: Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357Reputation: 6357
Quote:
Originally Posted by mansour View Post
Well, there is a /srv/samba/share/ in the smb.conf file, the main samba config file, which is supposed to be the shared directory between server and all other machines, including windows machine.
Here's a clearer explanation of where I was headed.

I can put a directory in smb.conf to be shared over the network, but if I have not also configured the directory to be shared in the directory settings, samba can't share it. And versy vicy. This is one of my "learn by making mistakes" lessons.

If you open a file manager as root (Konqueror or Nautilus, either would work fine) and navigate to /srv/samba/share, does it show as shared in the directory configuration. This is separate from the samba configuration. In Nautilus, right-click on the directory name and "sharing" is a choice in the pop-up menu; in Konqueror, select "permissions" from the pop-menu and "sharing" is a tab in the dialog box.

You don't have to do this a root to check the settings, but it helps to do it as root in case you have to change the sharing.

Last edited by frankbell; 11-28-2010 at 08:09 PM. Reason: clarity
 
Old 11-28-2010, 08:42 PM   #6
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by frankbell View Post
Here's a clearer explanation of where I was headed.

I can put a directory in smb.conf to be shared over the network, but if I have not also configured the directory to be shared in the directory settings, samba can't share it. And versy vicy. This is one of my "learn by making mistakes" lessons.

If you open a file manager as root (Konqueror or Nautilus, either would work fine) and navigate to /srv/samba/share, does it show as shared in the directory configuration. This is separate from the samba configuration. In Nautilus, right-click on the directory name and "sharing" is a choice in the pop-up menu; in Konqueror, select "permissions" from the pop-menu and "sharing" is a tab in the dialog box.

You don't have to do this a root to check the settings, but it helps to do it as root in case you have to change the sharing.

Hi:


OK, how would I open Nautilus from the terminal, what is the command for it?
 
Old 11-28-2010, 08:44 PM   #7
tordfurden
Member
 
Registered: Aug 2009
Location: Kansas City
Distribution: Special Blend
Posts: 41

Rep: Reputation: 1
Quote:
Originally Posted by mansour View Post
Hi:


OK, how would I open Nautilus from the terminal, what is the command for it?
Take a guess.

(I'll give you a hint . . . it's nautilus.)
 
Old 11-28-2010, 09:06 PM   #8
mansour
Member
 
Registered: Nov 2010
Location: Toronto, Canada
Distribution: Ubuntu 10.04 Lucid Lynx - Ubuntu 10.10 notebook - Debian 5.08 - Win XP
Posts: 172

Original Poster
Rep: Reputation: 2
Quote:
Originally Posted by tordfurden View Post
Take a guess.

(I'll give you a hint . . . it's nautilus.)

root@ubuntu-server:~# nautilus
Could not parse arguments: can not open display
root@ubuntu-server:~#gksu nautilus
(gksu:3312):GtK-WARNING **: cannot open display:
root@ubuntu-server:~#sudo nautilus
Could not parse arguments: can not open display
root@ubuntu-server:~#

Actually did you guys know that this a server machine not a desktop????

So doesn't have x-server installed on it, so
take a guess: Nautilus and Konqueror won't work on it.

A server isn't supposed to have X-window anyway, am I right!!!!!!?????

And if you read my first post more carefully, this a proof that the share directory is shared based on its permissions, if I understand the meaning of shared well,

**********************************

And these are the permissions of the share directory.

total 4
drwxrwxrwx 2 nobody nogroup 4096 2010-11-23 13:46 share

*****************************************



So I don't know what you are talking about.



mansour

Last edited by mansour; 11-29-2010 at 12:04 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Headaches, time lossed...is Samba working or not, Windows can't see samba...crap vigdavies Linux - Networking 12 11-07-2009 04:40 PM
Samba... not working at all... worldgnat Linux - Networking 2 05-28-2005 06:11 PM
Samba isn't Working Snump Fedora 18 10-27-2004 07:59 PM
Samba 3 not working (nearly never), but samba 2 works OK vmicho Linux - Networking 0 10-05-2004 01:03 PM
samba working, then installed openSSL and not samba not working hamish Linux - Networking 3 05-17-2004 01:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:19 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