LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-05-2006, 08:13 AM   #1
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Rep: Reputation: 15
Help with SAMBA -- FC4


Can any kind soul out there tells me what is wrong with my setup...I can see SAMBA in my windows XP-SP1 but I can not connect. I disabled ZoneAlarm just in case, yet that did not help.

1. My /etc/samba/smb.conf

Code:
#======================= Global Settings =====================================
[global]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = HOME

# server string is the equivalent of the NT Description field
   server string = Samba Server

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
;   hosts allow = 192.168.1. 192.168.2. 127.
   hosts allow = 192.168.1.

# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   printcap name = /etc/printcap
   load printers = yes

# This option tells cups that the data has already been rasterized
cups options = raw

# this tells Samba to use a separate log file for each machine
# that connects
 log file = /var/log/samba/%m.log
# all log information in one file
#   log file = /var/log/samba/log.smbd

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = user

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
;  encrypt passwords = yes
  smb passwd file = /etc/samba/smbpasswd

# Most people will find that this option gives better performance.
# See speed.txt and the manual pages for details
   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
   dns proxy = no 

#============================ Share Definitions ==============================
   idmap uid = 16777216-33554431
   idmap gid = 16777216-33554431
   template shell = /bin/false
   winbind use default domain = no
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

# NOTE: If you have a BSD-style print system there is no need to 
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
# Set public = yes to allow user 'guest account' to print
   guest ok = no
   writable = no
   printable = yes

[media]
   path = /mnt/media
   public = yes
   writable = no

[work]
   path = /mnt/work
   public = yes
   writable = yes
2. Testing the configurations
Code:
/usr/bin/testparm

Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[media]"
Processing section "[work]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
        workgroup = HOME
        server string = Samba Server
        log file = /var/log/samba/%m.log
        max log size = 50
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
        printcap name = /etc/printcap
        dns proxy = No
        idmap uid = 16777216-33554431
        idmap gid = 16777216-33554431
        hosts allow = 192.168.1.
        cups options = raw

[homes]
        comment = Home Directories
        read only = No
        browseable = No

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

[media]
        path = /mnt/media
        guest ok = Yes

[work]
        path = /mnt/work
        read only = No
        guest ok = Yes
3. I added someuser
Code:
smbpasswd -a someuser
4. /mnt/media and /mnt/work are owned by someuser and I chmod them 777!!!


5. I'm not an expert in SELinux .....So I disabled it...
Code:
/usr/sbin/setsebool -P smbd_disable_trans 1
6. I opened the required ports
Code:
/sbin/iptables -A INPUT -p tcp -s 192.168.1.2 --sport 137:139 -j ACCEPT
/sbin/iptables -A INPUT -p udp -s 192.168.1.2 --sport 137:139 -j ACCEPT
/sbin/iptables -A INPUT -p tcp -s 192.168.1.2 --sport 445 -j ACCEPT
/sbin/iptables -A INPUT -p udp -s 192.168.1.2 --sport 445 -j ACCEPT
7. My /etc/sysconfig/network
Code:
NETWORKING=yes
HOSTNAME=LaptopFC4.localdomain
8. My /etc/hosts
Code:
127.0.0.1               LaptopFC4.localdomain  LaptopFC4
9. started SAMBA
Code:
/sbin/service smb start
And when I click on "samba server(laptopfc4)" in "My Network Places" I receive this message
"Laptopfc4 is not accessible. You might not have permission....."....

So I'm not getting the user/pass box. Where is the problem??!!
 
Old 03-05-2006, 01:08 PM   #2
davcefai
Member
 
Registered: Dec 2004
Location: Malta
Distribution: Debian Sid
Posts: 863

Rep: Reputation: 45
These settings work for me:

security = share
encrypt passwords = false
obey pam restrictions = no

You could try to start with these.
 
Old 03-05-2006, 01:55 PM   #3
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Original Poster
Rep: Reputation: 15
sorry...that did not help thnx for the suggestion.
 
Old 03-06-2006, 12:52 PM   #4
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Original Poster
Rep: Reputation: 15
sory to bring this up....but i'm desperate for your help guys...
 
Old 03-06-2006, 07:10 PM   #5
leosgb
Member
 
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363

Rep: Reputation: 31
I am having a similar problem here. I can see the Server from my XP but i cant connect to it. But when i try the server's IP it works. Can you try: "\\your_server_ip" and see if you can connect to it? And if so maybe we can try to work together to solve this common problem. My server is correctly listed in my Network Neighborhood but when i click on it it says i dont have permission for that. Nonetheless when i try to reach it thru the IP it works. Anyone has any ideas? Thanks for any help.
 
Old 03-06-2006, 08:48 PM   #6
christopherccv
Member
 
Registered: Jul 2003
Location: malaysia
Distribution: redhat
Posts: 31

Rep: Reputation: 15
i think is the user access right issue. please make sure your last chmod number at least 6.
 
Old 03-06-2006, 09:02 PM   #7
arew264
Member
 
Registered: Jul 2005
Distribution: Arch Linux / Debian Etch (soon) / have tried many others
Posts: 94

Rep: Reputation: 15
I had a similar problem in both Debian and CentOS. In debian I solved it by setting the hostname to the ip (no idea why that worked so you probably don't want to do it). There are two errors that windows may give you after the whole contact ur admin you may not have permission crap. Theres:
THe specified network path could not be found

and something else that I can't remember at this moment. I found a thread on this online where some people had solved it by simplifying their smb.conf files down to what was needed. I'll post mine later on tonight.

BTW: don't delete ur original smb.conf, just rename it to smb.conf.bak. It's nice having all those comments there in a backup file to tell you what things do.
 
Old 03-07-2006, 04:41 AM   #8
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by leosgb
Can you try: "\\your_server_ip" and see if you can connect to it?
Thnx...I did try this and it did not work....

Quote:
Originally Posted by christopherccv
i think is the user access right issue. please make sure your last chmod number at least
Thnx...Can you explain more??

Quote:
Originally Posted by arew264
I'll post mine later on tonight.
Thnx...I really appreciate that.
 
Old 03-09-2006, 04:05 PM   #9
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Original Poster
Rep: Reputation: 15
Ok Guys.....the problem was in the firewall

the proper way to open the ports is

Code:
/sbin/iptables -I INPUT -p udp -m multiport --destination-port 137,138 -j ACCEPT
/sbin/iptables -I INPUT -p tcp -m multiport --destination-port 139,445 -j ACCEPT
more info is here http://forums.fedoraforum.org/showthread.php?t=97859 and here http://www.linux-sxs.org/networking/nt4dom_samba.html

thnx....
 
Old 03-09-2006, 11:52 PM   #10
leosgb
Member
 
Registered: Nov 2004
Location: Brazil
Distribution: Gentoo
Posts: 363

Rep: Reputation: 31
That helped me! Thanks a lot for your reply piforever!
 
Old 03-10-2006, 04:08 AM   #11
piforever
Member
 
Registered: Dec 2005
Distribution: CentOS 5 - Debian 5
Posts: 112

Original Poster
Rep: Reputation: 15
I'm really glad that this helped both of us....the main reason for me to mention every step and stating the commands used is because i thought it will serve as a way for me/others to debug and learn using runlevel 3. some suggested using the GUI which i did but did not help and i'm glad that we can do it w/o using the GUI.


*EDIT*

I just wanted to add that my /etc/hosts looks like this...
Code:
127.0.0.1               localhost.localdomain localhost
127.0.0.1               LaptopFC4.localdomain LaptopFC4

Last edited by piforever; 03-10-2006 at 04:17 AM.
 
  


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
Samba doesn't work on FC4 Hirszu Fedora 5 12-29-2005 02:50 PM
Samba and FC4 Linux31 Fedora - Installation 13 12-29-2005 10:39 AM
samba FC4 Visko Fedora 2 10-23-2005 07:16 AM
FC4 + Samba. Can anyone help? tenraek Fedora 1 10-15-2005 12:56 PM
noob Samba on FC4 Ray4389 Linux - Networking 7 08-04-2005 11:40 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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