?
Solved

SAMBA and applying config changes

Posted on 2005-02-27
15
Medium Priority
?
873 Views
Last Modified: 2013-11-22
Hello Experts,

I made changes to my rc.conf, is there a way to make them take effect without restarting freebsd? And does anybody have some good SAMBA tutorials, I can't get it to work with the handbook.
0
Comment
Question by:drakkarnoir
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 7
15 Comments
 

Author Comment

by:drakkarnoir
ID: 13415286
Hmm, I got samba working and up. In fact, I can view it in my Windows client, but I can't access it (it says network resource is inaccessible)...
0
 
LVL 8

Accepted Solution

by:
it_alchemist earned 2000 total points
ID: 13415584
You either need to have liberal permissions on the specific shares you want windows clients to access which is not recommended or you should ensure that your windows clients logon to the network using the same username and password combination that you configure using smbpasswd. Depending on how you want to do it, you can set one general user which all machines use or you can have per-user logins so that each user can have access to their private home directories and you can have more fine-grained control over the sharing and permissions.  

Just remember that Samba requires individual samba users and passwords to be added using the smbpasswd command (i.e. to add drakkar user to samba you issue: smbpasswd -a drakkar and then it will ask you for a password you want to assign for that user). There are other ways to store Samba usernames and passwords (such as through LDAP or SQL), but for a simple installation the built-in smbpasswd is sufficient.

Remember too to add user accounts to the FreeBSD system first (adduser command). These should be configured using the same username and password combination you will later assign to Samba using the smbpasswd command.

Finally, setup the username and password as an account on the windows machine. This way, the user logs in using the same username-password combo used at all stages of the authentication process (windows machine, samba authentication, freebsd authentication).

You don't have to do it this way, but it makes your life much easier. Otherwise you'll have to configure separate username/password details for each share mounted by a windows client.

To restart samba, simply: /usr/local/etc/rc.d/samba.sh restart

Have you tried the official Samba howto: http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/ ?



0
 

Author Comment

by:drakkarnoir
ID: 13416820
Now when I go to View Workgroup Computers on my XP client, it says "Workgroup is not accessible". My SAMBA, Windows, and FreeBSD username and password are all the same.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:it_alchemist
ID: 13416926
Have you configured the Workgroup setting on your XP Client? You can find that in Start -> Control Panel -> System (then restart your xp computer).

Make sure the workgroup is set to the same as you've set it on the samba share. If you don't have NT or Windows 2000/2003 Servers on your network then you might also want to enable your samba server as:

[global]
domain master = Yes
local master = Yes
preferred master = Yes
os level = 35
wins support = Yes

Then configure your xp clients to connect to your samba server via WINS. You can configure this in network properties in the control panel.

restart samba after any changes.



0
 

Author Comment

by:drakkarnoir
ID: 13416931
My workgroup name in SAMBA is "Workgroup" and on my XP Pro machine it's "Workgroup". Before I setup Samba, I was able to see the computer I'm on in the workgroup computers section.
0
 
LVL 8

Expert Comment

by:it_alchemist
ID: 13416980
Try making your Samba server be a domain master browser and local master browser as well as WINS, as that will improve your client's ability to find things on the network. You may need to restart your windows clients to flush their cached network info once you've applied the new settings.

also: encrypted passwords = yes
        public = yes

If that doesn't work you might want to try:

        security = share

as well which loosens some of the restrictions on the server. Check your samba logs for details of any problems. Also run: testparm to make sure that your smb.conf file is syntactically corrrect.

0
 

Author Comment

by:drakkarnoir
ID: 13417042
I'm using SWAT, so the syntax has to be right?
0
 
LVL 8

Expert Comment

by:it_alchemist
ID: 13417172
From the Samba install notes:


Test Your Config File with testparm

It's important to validate the contents of the smb.conf file using the testparm program. If testparm runs correctly, it will list the loaded services. If not, it will give an error message. Make sure it runs correctly and that the services look reasonable before proceeding. Enter the command:

      root#  testparm /etc/samba/smb.conf
      

Testparm will parse your configuration file and report any unknown parameters or incorrect syntax.

Always run testparm again whenever the smb.conf file is changed!

0
 

Author Comment

by:drakkarnoir
ID: 13417264
Said it was okay
0
 
LVL 8

Expert Comment

by:it_alchemist
ID: 13417275
and did you do all the other stuff (set master domain browser, local master browser, wins support, etc.) ?

0
 
LVL 8

Expert Comment

by:it_alchemist
ID: 13417277
post your smb.conf
0
 

Author Comment

by:drakkarnoir
ID: 13417461
Op, I got it working. Turns out I needed to run the Network Wizard in XP. Thanks :)
0
 

Author Comment

by:drakkarnoir
ID: 13417647
Ah geez, says I don't have write access to it, even though I put "No" to Read Only in my share group called "home"
0
 
LVL 8

Expert Comment

by:it_alchemist
ID: 13417713
check the permissions set on the actual directory (ie. ls -la /path/to/directory/you/are/sharing)

Then if necessary:

chown -R user:group /path/to/directory/you/want/to/share

(user being the user and/or group that you want to allow access to)

chmod -R 777 (or 775, etc.) /path/to/directory/you/want/to/share

ensure you have:

writeable = yes

in your smb.conf entry for that particular share.

restart samba ( /usr/local/etc/rc.d/samba.sh restart )

You can also use the force user =  and force group = parameters in smb.conf to ensure that all permissions are treated as a particular user regardless of who logs in.


0
 

Author Comment

by:drakkarnoir
ID: 13421851
Made another question, not fair to keep asking you new questions on the same thread.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

My previous tech tip, Installing the Solaris OS From the Flash Archive On a Tape (http://www.experts-exchange.com/articles/OS/Unix/Solaris/Installing-the-Solaris-OS-From-the-Flash-Archive-on-a-Tape.html), discussed installing the Solaris Operating S…
Using libpcap/Jpcap to capture and send packets on Solaris version (10/11) Library used: 1.      Libpcap (http://www.tcpdump.org) Version 1.2 2.      Jpcap(http://netresearch.ics.uci.edu/kfujii/Jpcap/doc/index.html) Version 0.6 Prerequisite: 1.      GCC …
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses
Course of the Month8 days, 10 hours left to enroll

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question