LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 07-31-2013, 08:39 AM   #1
vahab
Member
 
Registered: Jun 2011
Posts: 58

Rep: Reputation: Disabled
See samba server shares from Windows machine without user/password


Hi,
I have a samba server (RHEL5 or RHEL6) with default configuration. I just start the service. Then from other linux server I can see the shares by :
smbclient -L server_IP

It only prompts a password and by pressing enter it passes and shows server information and list of shares.
But when I try from a windows machine by typing :
\\server_IP
It prompts user/password to me and there is no way to pass it. I tried to set workgroup of windows machine same as samba server which didn't help.

Can you please tell me why it is not possible and maybe there is a way to do that without changing server configuration security type and guest account ,...

Thanks.
 
Old 07-31-2013, 09:29 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
The correct windows command to see shares is the net command:
net view \\server_IP

You should also be able to see the shares from network neighborhood assuming they are browesable.

Last edited by michaelk; 07-31-2013 at 09:30 AM.
 
1 members found this post helpful.
Old 07-31-2013, 11:32 AM   #3
vahab
Member
 
Registered: Jun 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
Thanks but I get below error :

c:\net view \\server_IP
System error 5 has occurred.

Access is denied.
 
Old 07-31-2013, 01:24 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,699

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Could be many reasons.
I assume the firewall if enabled allows SMB traffic.
Is selinux if enabled configured for samba?
Make sure the host name is not localhost
Have you added a smb user via the smbpasswd command?
 
Old 07-31-2013, 03:14 PM   #5
vahab
Member
 
Registered: Jun 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
- Firewall is off
- SELinux is disabled
- hostname is not localhost
- I added a smb user via smbpasswd and entered the credentials when trying to open \\server_IP from windows and it is working, but my question is how come "smbclient -L" from other linux machine can browse samba server without user/password but windows cannot.
 
Old 07-31-2013, 03:21 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,339

Rep: Reputation: Disabled
Quote:
Originally Posted by vahab View Post
Then from other linux server I can see the shares by :
smbclient -L server_IP

It only prompts a password and by pressing enter it passes and shows server information and list of shares.
But when I try from a windows machine by typing :
\\server_IP
It prompts user/password to me and there is no way to pass it. I tried to set workgroup of windows machine same as samba server which didn't help.
What are the values for "security" and "map to guest" in smb.conf?

The Windows client will attempt to authenticate using the username of the currently logged-in user. If the username does not exist on the Linux server (which is more than likely), you will need to map "bad user" to guest in Samba.

The Linux client will also try to authenticate with the username of the logged-in user, but perhaps you are using a username that exists on the server as well? In that case, mapping "bad password" to guest would be sufficient.
 
1 members found this post helpful.
Old 07-31-2013, 11:31 PM   #7
vahab
Member
 
Registered: Jun 2011
Posts: 58

Original Poster
Rep: Reputation: Disabled
security is USER.
I added below line
map to guest = bad user
and now it is working as I expect. The windows machine can browse just like smbclient -L command.

Thank you so much for your help
 
  


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
Set Samba server to prompt for password before viewing shares dalehsti Linux - Server 1 12-05-2011 02:03 PM
no permission to access shares on a samba server from a SPECIFIC only, winXP machine nass Linux - Server 0 05-17-2007 02:50 PM
Samba server shares linux disk but windows user cannot connect mcmorj SUSE / openSUSE 2 04-26-2007 03:54 AM
Samba -- XP user can log in to shares but smbclient user always gets password errors ejoe Linux - Software 3 04-18-2005 10:55 AM
Accessing samba shares from a windows machine lacitpo Linux - Software 2 12-13-2004 06:47 AM

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

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