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 06-05-2012, 08:56 AM   #1
scruffyfox
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Rep: Reputation: Disabled
Can only connect to Samba shares when logged into SSH


Hi,

Im a bit of a noob when it comes to Linux and servers, but I've got a home server and its running Samba 3.5.8. It was working fine up till a couple days ago.

Basically what happens is, when I try to access the samba shares from my Windows 7 PC, I get an access denied error or permissions error. But it isn't until I log into the server via Putty SSH, it begins working again. I try to restart samba logged in to SSH and accessing it, its fine up till i logout or close the terminal window.

I've literally no idea what the hell has happened for it to do that, i've looked absolutely everywhere for an answer and can't find one.

I've tried reinstalling samba, restoring the config, upgrading the OS but they all have the same issue.

Here is my config
Code:
#======================= Global Settings =======================

[global]
unix extensions = no
	log file = /var/log/samba/log.%m
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	obey pam restrictions = yes
	follow symlinks = yes
	map to guest = bad user
	encrypt passwords = true
	passwd program = /usr/bin/passwd %u
	wins support = yes
	dns proxy = no
	netbios name = ScruffyServer
	wide links = yes
	server string = 
	unix password sync = yes
	workgroup = MSHOME
	os level = 20
	security = user
	syslog = 0
	usershare allow guests = yes
	panic action = /usr/share/samba/panic-action %d
	max log size = 1000
	pam password change = yes
;	passdb backend = tdbsam
;	os level = 20
name resolve order = wins lmhosts hosts bcast

[Public]
	read list = public
	user = public
	path = /home/scruffy/Public

[Music]
browseable = no
	read list = music
	user = music
	path = /home/scruffy/Public/Music
	write list = music

[Movies]
browseable = no
	read list = movies
	user = movies
	path = /home/scruffy/Public/Movies
	write list = movies

[TVShows]
browseable = no
	read list = tvshows
	user = tvshows
	path = /home/scruffy/Public/TVShows
	write list = tvshows

[Web]
browseable = no
	read list = web
	user = web
	path = /home/scruffy/Public/Web
	write list = web
The original problem I had when trying to fix the samba shares before this problem arose was, the samba server started at boot, but could not access till I logged into SSH and started it as my main user, i tried adding the script to chkconfig and various other things but none of them worked, I have reversed the changes I did to try and fix the current problem, but still no luck.

I have no idea what the hell to do

Last edited by scruffyfox; 06-06-2012 at 12:47 PM. Reason: Removed commented values
 
Old 06-06-2012, 05:33 AM   #2
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 718

Rep: Reputation: 102Reputation: 102
Lightbulb

Your access when you ssh is through ssh not samba. So samba is not working at all. Your config appears after a scan appears to have no settings. You have eberything commented out ( ; / # ).

This will give you a idea of a base config.

https://www.linux.com/learn/tutorial...sy-samba-setup

Hope this helps.
 
Old 06-06-2012, 06:50 AM   #3
Babertje
Member
 
Registered: Jun 2009
Location: Haarlem, The Netherlands
Distribution: Archlinux
Posts: 125

Rep: Reputation: 20
When no master browser is running on the subnet, potential browsers choose a new master browser among themselves in a process called an election. Try to set your OS Level to 32 this makes your Samba server the PDC rather then W7 looks to itself as domain controller. see: http://www.samba.org/samba/docs/usin...-CHP-7-TABLE-2
 
Old 06-06-2012, 01:38 PM   #4
scruffyfox
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jv2112 View Post
Your access when you ssh is through ssh not samba. So samba is not working at all. Your config appears after a scan appears to have no settings. You have eberything commented out ( ; / # ).

This will give you a idea of a base config.

https://www.linux.com/learn/tutorial...sy-samba-setup

Hope this helps.
I've removed all the comments to make it a bit easier to read

---------- Post added 06-06-12 at 12:39 PM ----------

Quote:
Originally Posted by Babertje View Post
When no master browser is running on the subnet, potential browsers choose a new master browser among themselves in a process called an election. Try to set your OS Level to 32 this makes your Samba server the PDC rather then W7 looks to itself as domain controller. see: http://www.samba.org/samba/docs/usin...-CHP-7-TABLE-2
Still having the same issue.

Whats weird is that when I try to view the server in the networking folder, I can see the main 2 folders that are open for every user (public and private) but can't actually go inside them.
 
Old 06-07-2012, 05:27 AM   #5
jv2112
Member
 
Registered: Jan 2009
Location: New England
Distribution: Arch Linux
Posts: 718

Rep: Reputation: 102Reputation: 102
It is not a question of being able to read. Those "special" characters are indicators to the program not to include in the the programs configuration.
 
Old 06-07-2012, 11:37 AM   #6
scruffyfox
LQ Newbie
 
Registered: Jun 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jv2112 View Post
It is not a question of being able to read. Those "special" characters are indicators to the program not to include in the the programs configuration.
The global config or the shares were never commented anyway? it was only the example configuration and definitions that were commented.
 
  


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
[SOLVED] Can't connect to Samba shares after 12.2-->13.1 upgrade (Samba 3.2.x-->3.5.2) nakedlunch Slackware 6 06-07-2010 05:24 PM
connect to samba shares on startup pepsimachine15 Linux - Software 39 07-01-2008 08:28 AM
samba shares take an age to connect miner49er Linux - Software 5 09-20-2006 02:38 PM
Samba can't connect to Windows shares soren625 Linux - Software 2 01-22-2005 09:25 AM
Can't connect to Windows shares w/ Samba everythingand2 Slackware 7 01-15-2005 11:13 PM


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