LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-16-2016, 01:39 PM   #1
sahil0512
LQ Newbie
 
Registered: Nov 2015
Location: India
Distribution: Redhat
Posts: 4

Rep: Reputation: Disabled
Question Not able to access samba share from Windows


Hello All,

I have configured samba on my Linux Machine but i am not able to access that share on my windows machine.
Can anyone suggest what is the issue.

/etc/samba/smb.conf file

[samba]
comment = samba
path = /samba
public = yes

Selinux and iptables are disabled

[root@server /]# ll -d samba/
drwxrwxrwx. 2 root root 4096 Dec 17 05:58 samba/
[root@server /]#
 
Old 12-16-2016, 02:30 PM   #2
timl
Member
 
Registered: Jan 2009
Location: Sydney, Australia
Distribution: Fedora,CentOS
Posts: 751

Rep: Reputation: 156Reputation: 156
Probably a good idea to advice what distro you are using. I use Centos 6 and log files are stored here:

Quote:
/var/log/samba/
a look around there may explain what is the problem

Quote:
testparm /etc/samba/smb.conf
is a useful tool to show you how samba interprets your configuration
 
Old 12-16-2016, 08:00 PM   #3
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,459
Blog Entries: 28

Rep: Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175Reputation: 6175
Have you configured the directory in question as shared in the directory properties? That is a separate operation from configuring your smb.conf file.
 
Old 12-17-2016, 12:54 AM   #4
Elizine
Member
 
Registered: Aug 2015
Posts: 54
Blog Entries: 1

Rep: Reputation: Disabled
Please post your smb.conf and folder permissions for the directory.

Code:
ls -l /path/to/share
smb.conf file has a lot of comments. A friendly way to post the contents is to strip the comments with the following command.

Code:
cd /etc/samba
sudo testparm -s smb.conf >smb.conf.clean
cat smb.conf.clean
If you get permission denied you can switch to root user first with:
Code:
sudo su
 
Old 12-17-2016, 04:54 PM   #5
WFV
Member
 
Registered: Apr 2012
Location: somehow, somewhere
Distribution: Arch
Posts: 197

Rep: Reputation: Disabled
Code:
cd /etc/samba
sudo cp smb.conf smb.conf.orig
sudo nano smb.conf
(or other preferred text editor)
make changes, save and close, the cp makes a copy of the original smb.conf file with all the comments and information
Code:
 sudo testparm -s smb.conf > smb.conf.master
sudo cp smb.conf.master smb.conf
this strips all the comments and unnecessary info from smb.conf and creates a clean master for future reference and troubleshooting and copies it to smb.conf for a clean smb.conf
Code:
sudo testparm -I
to see your current samba setup
Code:
 sudo systemctl restart nmbd smbd
sudo smbtree -d3
reloads the samba and nmbind daemons and smbtree -d3 to see how other pc's see your samba shares.
All of this information is mostly for assistance troubleshooting. Setting up samba properly is key, and acc'd to the Samba documentation you might have to make some minor changes on the windows machines too. On Windows are you able to see the Linux computer via "Network" or "Map network drive" using the IP address?

Last edited by WFV; 12-17-2016 at 05:13 PM.
 
1 members found this post helpful.
Old 12-25-2016, 11:41 PM   #6
sahil0512
LQ Newbie
 
Registered: Nov 2015
Location: India
Distribution: Redhat
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks everyone for your help.

I am able to configure it successfully.
 
  


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
No access to Samba share anymore from windows 10? roseysdaddy Linux - Newbie 3 01-21-2016 07:19 AM
Samba share cant access in windows sagar666 Linux - Server 12 04-23-2015 05:00 AM
[SOLVED] samba cannot access share from windows 7 ted_chou12 Linux - Software 3 08-15-2012 09:14 PM
Windows 7 unable to access Samba share kaplan71 Linux - Software 2 08-11-2011 04:33 AM
Access linux SAMBA share from windows pengu Linux - Software 6 02-17-2007 11:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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