LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 05-23-2008, 08:54 PM   #1
wo2caisley
LQ Newbie
 
Registered: Apr 2008
Location: Sydney
Distribution: Debian
Posts: 13

Rep: Reputation: 0
debian etch - samba issue


Hey All,

I have just set up a fresh linux install - followed the samba guide at aboutdebian.com but cannot access any shares.

When I try to access the share from a windows machine get following error;
\\Serenity is not accessible. You might not have permission to use this network resource. Contact the administrator of ....

The network path was not found.

My smb.conf;

[global]
workgroup = MYHOMENET
server string = %h server (Samba %v)
; wins support = no
; wins server = w.x.y.z
dns proxy = no
; name resolve order = lmhosts host wins bcast
log file = /var/log/samba/log.%m
max log size = 1000
; syslog only = no
syslog = 0
panic action = /usr/share/samba/panic-action %d
security = share
encrypt passwords = true
passdb backend = tdbsam guest
obey pam restrictions = yes
; guest account = nobody
invalid users = root
; unix password sync = no
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
; pam password change = no
load printers = yes
printing = bsd
printcap name = /etc/printcap
; printing = cups
; printcap name = cups
; printer admin = @ntadmin
preserve case = yes
short preserve case = yes
; include = /home/samba/etc/smb.conf.%m
socket options = TCP_NODELAY
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
; domain master = auto
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

[files]
comment = Shared Files
path = /home/share
writable = yes
guest ok = yes

[homes]
comment = Home Directories
browseable = no
writable = no
create mask = 0700
directory mask = 0700

;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

[printers]
comment = All Printers
browseable = yes
path = /tmp
printable = yes
public = yes
writable = yes
create mode = 0777

[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
; write list = root, @ntadmin

;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom
 
Old 05-23-2008, 10:05 PM   #2
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey There,

I don't see any glaring errors, but maybe these two lines would help if you added them to your file share sections:

Quote:
available = yes
browseable = yes
and in the main smb.conf set the

Quote:
netbios name = Serenity
I'm not sure if that'll fix your problem, but hopefully

Best wishes,

Mike
 
Old 05-24-2008, 10:53 PM   #3
wo2caisley
LQ Newbie
 
Registered: Apr 2008
Location: Sydney
Distribution: Debian
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks eggixyz - I made those changes and now the system itself does not appear under the Mshome network on my XP machine.

I tried with & without the netbios string - no change.

What would cause it to now not be displayed?
 
Old 05-24-2008, 11:11 PM   #4
wo2caisley
LQ Newbie
 
Registered: Apr 2008
Location: Sydney
Distribution: Debian
Posts: 13

Original Poster
Rep: Reputation: 0
I restarted the computer and now have a different issue;

Under windows networking, now have two lists;

Mshome;
- serenity server (Samba 3.0.24) (Serenity)

Myhomenet
- cant expand the list

Both are still showing the same error as before.

I also ran testparm - but the output did not seem to match the smb.conf file (i.e. the changes done as above). I restarted the service but got an error;

serenity:/etc/samba# /etc/init.d/samba restart
Stopping Samba daemons: nmbd smbdstart-stop-daemon: warning: failed to kill 3330: No such process.
Starting Samba daemons: nmbd smbd.
 
Old 05-24-2008, 11:12 PM   #5
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey There,

That doesn't seem to make any sense... If you remove all the changes and completely stop the smbd and nmbd processes and restart them, does it still not show up?

I can't think of a reason why adding those options would cause your system to disappear. The only one that could have made a difference would be the netbios string.

One thing to keep in mind also, is that the Windows PDC can sometimes take a good while to find a new machine (or one that's changed). It's been a long time since I've admin'ed Windows (NT 4.0) but that might be part of the issue.

Also, here's another string you could add to your smb.conf to see if it is really gone or if it's just a name resolution problem with Windows:

name resolve order = lmhosts host wins bcast

You already have it in there commented out, but this way you could edit your lmhosts or host file on your local machine, add an entry for your samba server and it should show up. That would mean that WINS dumped it and will take some time to find it again.

Let me know how this progresses,

Best wishes,

Mike
 
Old 05-24-2008, 11:16 PM   #6
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
oops,

We're replying to each other at the same time

If you can see the share again, have you checked out the file and directory masks in samba? The next thing I would do would be to set those to 0777 and see if I could connect.

If that works, I think 0755 would be acceptable for both, but that's up to you.

, Mike
 
Old 05-29-2008, 05:05 AM   #7
wo2caisley
LQ Newbie
 
Registered: Apr 2008
Location: Sydney
Distribution: Debian
Posts: 13

Original Poster
Rep: Reputation: 0
Thanks Eggixyz,

I have changed some things around and now have it all working correctly. I have one more question though;

Can samba be set up with User security (i.e. network user file in /etc/samba/) to restrict access to certain shares, but have certain shares available & browsable to ALL users?

Reason being - I want to have my folders only accessable by myself, but want to set up two special folders for "other users" backup & a media share folder which can be read by anyone (my xbox for example) and set it up as read only?

Thanks for your help.
 
Old 05-29-2008, 10:20 AM   #8
eggixyz
Member
 
Registered: Apr 2008
Posts: 310

Rep: Reputation: 30
Hey,

No problem. The short answer is yes. The long answer is it can be a headache depending on how you do it. There are ways to differentiate between shares, as far as auth goes, and to integrate with Windows authentication.

Usually, if I'm not sure what to do next, I'll use Swat first. It should come with your Samba distribution and you can set it up pretty easily by adding an entry for it in /etc/inetd.conf or creating /etc/xinetd.d/swat. Then you can connect to it through a web browser on that host on port 901 (swat is a standalone webserver). Look athe options you have there for your shares and, if they don't quite have what you're looking for, select to show advanced options. There are so many, it's crazy

Best wishes,

Mike
 
Old 05-29-2008, 10:42 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could have a profiles share:
Code:
[profiles]
comment = Network Profiles Service
path = %H
read only = No
create mask = 0600
directory mask = 0700
store dos attributes = Yes
Take a gander at the smb.conf manpage. It lists the variables you can use such as %H for a users home page, %u for the username, etc.

A user needs to be authenticated to access the profile share. The actual path of the share will be the users home directory.
You can also control read and write access using "Valid Users" instead. You could use a different path and have a directory with your user name there as in: "path = /var/samba/%u". You might want to use "valid user = %u" in this case as well so that samba won't try to find /var/samba/%u for another user. If you have many users, then using the profile share and not a [HOME] share would keep things clean because you won't need to search for your own home directory from a large group. Each user simply logs into the [Profile] share and they are in their home directory. I which our windows network at work would work like that!

Also remember to use the correct permissions on the directories. If you have a global read/write share, you need to set the "sticky" bit when creating the directory:
"sudo chmod ugo=rwxt". This will prevent one user from deleting another user's file. However for a read only share, they can't do that anyway.

Last edited by jschiwal; 05-29-2008 at 10:53 AM.
 
Old 06-07-2008, 03:15 AM   #10
sggsrr
LQ Newbie
 
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by wo2caisley View Post
Thanks Eggixyz,

I have changed some things around and now have it all working correctly. I have one more question though;

Can samba be set up with User security (i.e. network user file in /etc/samba/) to restrict access to certain shares, but have certain shares available & browsable to ALL users?

Reason being - I want to have my folders only accessable by myself, but want to set up two special folders for "other users" backup & a media share folder which can be read by anyone (my xbox for example) and set it up as read only?

Thanks for your help.
Hi wo2caisley

Could you tell me what it is you've changed that fixed your problem?
I'm having a very similar problem myself: After rebooting my debian etch machine accidentally samba no longer works. It'll work fine locally but I get "network path not found" when trying to map it as a network drive in XP.
 
  


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
Debian etch network connection issue HCLPfan Linux - Software 25 05-12-2009 06:46 PM
Debian Etch startup issue. kurianthayil Linux - Newbie 3 05-14-2008 01:01 PM
error in xp login in debian etch + samba +ldap xcore_on Linux - Networking 1 06-01-2007 08:31 AM
LXer: Debian 4.0 (Etch) Samba Standalone Server With tdbsam Backend LXer Syndicated Linux News 0 04-22-2007 03:46 AM
Debian Etch poptop, cannot connect issue... kbutcher5 Linux - Networking 1 06-27-2006 10:07 AM

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

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