LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-28-2006, 04:07 PM   #1
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993
Blog Entries: 1

Rep: Reputation: 46
Samba: trouble accessing windows share


I've got samba up and running.
I can access my linux box from windows, but I'm unable to access my windows box from linux.
In Gnome, when I go to Places > Connect to Server, and select Windows Share and the correct address (I can ping my windows box OK) I get a window asking me for a password. My Samba password (=my normal user password, and has been passed to smbpasswd when adding myself as a user) will not work. What am I doing wrong here?
 
Old 09-28-2006, 05:06 PM   #2
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
you are accessing the windows share that means you have to authenticate to the windows system that means you need to use the windows username and password of a user that has permission to access the windows share
 
Old 09-29-2006, 02:09 AM   #3
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
... but if I use my normal XP user account name (and there's no password for the account) I can't get access. That leads me to think I should maybe have generated a specific user account for accessing XP in Samba.
Also, my windows share is not reflected in smb.conf. Could that be part of the trouble?
 
Old 09-29-2006, 04:15 AM   #4
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
smb.conf if for the samba server. that means in that file you 'declare' all shares you want the linux server to share. samba can only share locally mounted fs's
if you are wonting to access a windows share that is purly a smb-client thing

if you are sure about not wanting a password on your windows account (i'll get back to that in a bit) use the smbmount command or mount -t smbfs
read the man page for detailed info on the command, but mainly you are looking for the option -o, example:
mount -t smbfs -o username='foo',password='bar' //server/share /path/to/mountpoint
in your case
mount -t smbfs -o username='foo',password='' //server/share /path/to/mountpoint
if you want mount to promt for a password (which is better actually):
mount -t smbfs -o username=foo,password //server/share /path/to/mountpoint

now to running a windows account with no password:
viruses and other unwanted stuff (trojans, etc) are able to find out what usernames are available on a windows system. trying those usernames agains no password is a common thing as a lot of people dont bother setting up one saying 'oh, i am the only one using it!' - thats what you think!
once test agains no password and the system has granted permission -boom- that was it! system infected!
 
Old 09-30-2006, 01:02 PM   #5
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
using your suggested mount command structure I simply get the mount help message. Man mount tells me
Quote:
Mount options for smbfs
Just like nfs, the smbfs implementation expects a binary argument (a
struct smb_mount_data) to the mount system call. This argument is con-
structed by smbmount(8) and the current version of mount (2.12) does
not know anything about smbfs.
and man smbfs doesn't exist on my system!?
As a matter of fact it isn't even installed!
Quote:
$ smb
smbcacls smbcontrol smbget smbprint smbstatus smbtree
smbclient smbcquotas smbpasswd smbspool smbtar
My fist attempt at accessing my windows share was through a GUI (as I explained at the beginning of my post)
If, using Gnome, I go to Places > Connect to Server and select Browse Network, my windows PC shows up with its name. If I then try to access this box, I get the same login window again and no combinateion of known usernames and passwords will let me connect to the windows box...
 
Old 10-02-2006, 02:22 AM   #6
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
then try using smbclient to connect to your windows share.
i am asking you to use other tools to find out where the problem might lie - just in case you should be wondering.

if you also set the windows share password to a space or somethign other than 'no password' would it then work?
 
Old 10-12-2006, 03:53 AM   #7
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
It's taken a while to get my XP box on line again, but I've figured out what the problem was! I didn't set anything to share on my XP box, so the XP firewall was blocking all access. Once I configured XP properly I could access it from my linux box without any problem.

Thanks for your help and attention.

Linmix
 
Old 10-12-2006, 11:30 AM   #8
Nathanael
Member
 
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940

Rep: Reputation: 33
the questions we all hate most like
Quote:
are you sure you pluged in the network cable?
are quite legit sometimes :-D
 
Old 10-12-2006, 03:42 PM   #9
linmix
Senior Member
 
Registered: Jun 2004
Location: Spain
Distribution: FC5
Posts: 1,993

Original Poster
Blog Entries: 1

Rep: Reputation: 46
absolutely right. It's quite often the stupidest and smallest details we overlook. The thing is I've read quite a bit about using samba, but all of it from a linux pint of view and usually that doesn't include anything even remotely related to whatever you may have to do on a windows box to make it work . This isn't a windows forum, but sometimes these little 'details' - like "make sure you allow your windows box to share" would be very welcome for a linux user as well.
 
  


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 - accessing windows share in linux mikeotieno Linux - Software 7 07-28-2006 06:12 AM
Trouble accessing smb share using winbind xscousr Linux - Networking 2 06-09-2005 03:12 PM
Accessing SAMBA Share via MS VC++ dhammika Programming 0 12-01-2004 10:14 PM
windows system hangs while accessing SAMBA share emailssent Linux - Software 0 09-14-2004 07:53 AM
Accessing Windows share from Red Hat 9 through Samba basu_arani Linux - Software 1 09-13-2003 05:33 AM

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

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