LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 01-02-2004, 03:56 PM   #1
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Rep: Reputation: 30
Unhappy Error while accessing samba share


Hello,

I've a problem accessing my Red Hat 9.0 share( /tmp ), from my Windows XP laptop.

Laptop : Dell Inspiron 5150 + D-Link 614+ Router, Laptop connected thro' cable
Linux : Red Hat 9.x[ 2.4.20-27.9 ], Samba[ 2.2.7a-security-rollup-fix ]

I followed the instructions in Red Hat Samba Manual and want to share /tmp to be
accessible from my laptop.

I'm able to see the Samba Server under "workgroup", but when I click it says
//Localhost is not accessible. You might not have permission to use
this network resource. Contact the adminstrator of this server to find
out if you have the access permissions.
You were not connected because a duplicate name exists on the
network. Go to the System in Control Panel to change hte computer
name and try again.


First of all, I don't duplicate computer names - Laptop is called "xyz" and the Linux
machine is called just localhost

[root@localhost samba]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
#127.0.0.1 localhost.localdomain localhost
<IP> localhost.localdomain localhost

But one related confusion is as why am I seeing both this samba servername and
my laptop's description( instead of the name ) in my Network Neighbourhood ???

In the Samba Server Config., I've "share" authentication mode and I've a setup an
account( samba ) account, which is actually an existing account to the Red Hat.

Also added is a share( /tmp ), which i've given access to everyone, not only to this
samba user.

What am I doing wrong ???? Appreciate your time and help.

Thanks.
Kramer.
 
Old 01-02-2004, 11:42 PM   #2
miaviator278
Member
 
Registered: Dec 2003
Location: Al-Diwania, Iraq (deployed)
Distribution: Slackware ONLY
Posts: 237

Rep: Reputation: 30
localhost is a reserved name for your machine, it's not a machine name it is there for various compatibility etc. reasons. you should run a network config or edit /etc/hosts and give your machine a name..

link your actually ip (not 127.0.0.1) to your machines hostname and then you should be able to read it.
 
Old 01-08-2004, 11:33 PM   #3
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
no luck yet

Ok,

I did the following, but no there yet...

now my /etc/hosts reads

<IP> localhost.localdomain my_machine

I tested the config with testparm and its working fine.

I added one more line to smb.conf, in the "global" section
netbios name = my_machine

next I tried to view this samba share from my laptop( which is the same network with a dlink router inbetween windows and redhat )

2 problems

1. If I use explorer, it still shows up as "samba server( localhost )" and it complains the same error message I had pasted 1st

1st of all "samba server" is the description I have given in the smb.conf, not my computer name

2. from the samba.org's documentation if I try

net use z: \\<IP>\global

I get "System error 53 error occured - The network path was not found"

What ammmmmmmmm I doing wrong ?

Thanks,
Kramer.
 
Old 01-09-2004, 01:23 AM   #4
miaviator278
Member
 
Registered: Dec 2003
Location: Al-Diwania, Iraq (deployed)
Distribution: Slackware ONLY
Posts: 237

Rep: Reputation: 30
a couple ideas that may or may not lead somewhere

did you setup a user in samba - and windows - so you have permission to access the share?

can you get to //ip in windows
can you get to the win files in linux
 
Old 01-09-2004, 02:09 AM   #5
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
>> a couple ideas that may or may not lead somewhere
>> did you setup a user in samba - and windows - so you have permission to access the share?

Yes. From System settings -> Server settings -> Samba Server -> Preferences -> Samba User -> Add User -> < chose one of the existing users( in my linux ) for unix username, windows username, passwords.

The unix user-name and the windows user-name are different.

>> can you get to //ip in windows
Yes.

>> can you get to the win files in linux
Yes. They're mapped, mounted( thro' /etc/fstab ) and are fully accessible.
 
Old 01-09-2004, 05:47 AM   #6
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Quote:
>> can you get to the win files in linux.
Yes. They're mapped, mounted( thro' /etc/fstab ) and are fully accessible.
Try unmounting/unmapping the shares in /etc/fstab first. This may be confusing Windows.

If that doesn't work, post your smb.conf file so we can have a look at it.
 
Old 01-11-2004, 03:25 PM   #7
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
smb.conf

[global]

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

netbios name = eashu

# 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 = <my ip's> 127.

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

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx, cups
printing = cups

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
# this tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/%m.log

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


# 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

# 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.
guest ok = yes
guest account = shankar
security = SHARE
dns proxy = no

[homes]
comment = Home Directories
browseable = yes
writeable = yes
valid users = %S
create mode = 0664
directory mode = 0775

[tmp]
comment = Temporary file space
path = /tmp
guest ok = yes
writeable = yes
 
Old 01-21-2004, 02:15 AM   #8
miaviator278
Member
 
Registered: Dec 2003
Location: Al-Diwania, Iraq (deployed)
Distribution: Slackware ONLY
Posts: 237

Rep: Reputation: 30
check your ip address, 127.0.0.1 and localhost are both reserved items
they represent the machine you are physically on, your network, problably shouldnt contain the 127. adress family
just to prevent confusion..
 
Old 01-21-2004, 11:07 PM   #9
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
I'm not using 127.0.0.1, but the real IP.

But as far as 'localhost' is concerned, I've left it in the same format as it was in /etc/hosts

IP localhost.localdomain localhost

I should be able to access the machine with my IP right - like
\\IP\global or \\IP\names
 
Old 01-22-2004, 01:47 AM   #10
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
Windows shares are very strange creatures. Firstly you need to ensure both machines reside in the same workgroup, if they do not then you will have problems accessing the samba shares.

Set your hosts allow driective to either:
<network>/<class>

or

<network>/<netmask>

e.g for a 192.68.0.0 network with a 255.255.255.0 netmask use either of these:

hosts allow = 192.168.0.0/24

or

hosts allow = 192.168.0.0/255.255.255.0

You need to add a workgroup directive too.. This will tell samba what workgroup you are in - make sure this is the same as your winbox.

workgroup = myworkgroup

If you want to implement username and password based sharing you need to set the security directive to user@

security = user
 
Old 01-22-2004, 11:55 AM   #11
Buick
LQ Newbie
 
Registered: Jan 2004
Posts: 25

Rep: Reputation: 15
Here are 2 suggestions.:

Add the user again via the console:
I had a problem this week where I added the user via SWAT, but it never was activated. When I add the user again via the console it worked.

Recreate directory share folder:
Make sure that users have permissions to Read/Write to the folder. Do this by using groups or by giving full permission to everyone.

See if that helps...

BTW The explorer view "Samba (localhost)" is correct the localhost is the name of your computer. I would add to your hosts file your ip and computer name than it will show up as "Samba (Computer Name). This is not required it's only a suggestion.
 
Old 01-23-2004, 10:13 AM   #12
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
I think its my firewall( iptables ) that's causing the problem.
I got a suggesstion to clear the iptable entries and I was able
to view/access the Linux directories thro' Windows.

But after that I had to reboot my Linux machine and now its
alienated.

But I do see an try for my laptop's IP in the IP tables' list

ACCEPT udp -- < laptop-ip > anywhere udp spt:domain dpts:1025:65535

Then why is it kicking the requests out ????

Thanks,
Kramer.
 
Old 01-23-2004, 11:42 AM   #13
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
For samba you need to open up inbound and outbound connections on ports 137 through 139 for TCP and UDP.

Something like:

#iptables -A INPUT -p tcp --dport 137:139 -j ACCEPT
#iptables -A INPUT -p udp --dport 137:139 -j ACCEPT

Should do it
 
Old 01-23-2004, 11:11 PM   #14
shankariyer
Member
 
Registered: Feb 2001
Location: California, USA
Distribution: Ubuntu 6.10[ HP Pavilion dv6000z ]
Posts: 165

Original Poster
Rep: Reputation: 30
I gave both
iptables -A INPUT -p tcp --dport 137:139 -j ACCEPT
iptables -A INPUT -p udp --dport 137:139 -j ACCEPT

But no luck. Still from my laptop net view doesn't show up the Linux box.
 
Old 01-24-2004, 04:16 AM   #15
codedv
Member
 
Registered: Nov 2003
Location: Slough, UK
Distribution: Debian
Posts: 146

Rep: Reputation: 15
I'm going to direct you to this trouble shooting link. It goes through most of the problems you are likley to get when setting up samba. With regards to your firewall, try temporairily disabling it and restart samba. If it works then you need to check your firewall config. Heres the link:

http://samba.mirror.ac.uk/samba/ftp/...amba24Hc13.pdf

Last edited by codedv; 01-24-2004 at 04:23 AM.
 
  


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
Accessing SAMBA Share via MS VC++ dhammika Programming 0 12-01-2004 10:14 PM
Missing folders when accessing samba share from XP IgniZtion Linux - Software 2 08-18-2004 11:34 PM
accessing ntfs share through samba GraemeK Linux - Software 2 01-26-2004 09:15 AM
Problem accessing home share with Samba bubber Linux - Software 5 03-09-2003 10:46 AM
Accessing a Samba Share bkmesenbrink Linux - Software 2 07-31-2002 03:04 PM


All times are GMT -5. The time now is 05:11 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration