Help configure SAMBA configuration for home network

Posted on 2009-05-08
Last Modified: 2013-12-02
I have a computer that is permanently on as a NAS fileserver, and as a printserver.
Ubuntu 9.04 is the OS. The printer is installed correctly.  We have several computers, either with Windows or Linux.

I would want a Samba configuration that
 a) shares the printer to windows and linux users, they can print with it how they want.
(ATM this works)

b) gives everyone of us (5 people) a share that only we can access.  I prefer this one has nothing to do with the NetBIOS name of the computer, but that you need to login with a username and password. (so it doesn't matter what pc you use to login with)
Also, in the event something goes wrong on the system, we should be able to recover those files (is this possible if the shares are password protected?)

c) gives a public share that everyone can access and write to.
Question by:PCBOP
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
  • 3
  • 2

Expert Comment

ID: 24337804

1. First, if you are not familiar with console, you can install swat (apt-get install swat) to configure samba via Web GUI

2. Use this link to config printer sharing

3.Use this link as your refrence for create share and ACLs

Author Comment

ID: 24338023
I found Swat, but I have the same problem as with your other links: it's over my head, too complicated for me. I have no idea exactly what I'm doing. I would prefer some very simple explanations, or sample layouts that fit my needs.

Accepted Solution

thetmanvn earned 500 total points
ID: 24342359

Sorry for late responding,

Ok, so I can demo for you a test share. because my home haven't got printer, but you can use this guide for sharing printer

Then I will let you go through make share folder as you 2nd and 3rd question by swat for easy looking in Ubuntu 8.04 (as same as on Ubuntu 9.04)

1./ First install swat (apt-get install swat) and install smbclient for testing in Ubuntu apt-get install smbclient

2./ Start inetd by /etc/init.d/openbsd-inetd start

3./ Go to http://yourubuntuip:901/ and login with your Ubuntu root user

4./ Configure Some Global Parameter as in samba01.png (Be sure to click Commit changes)

Test your first start by using and use see what we change in SWAT is showed here

root@test:~# smbclient -U% -L localhost
Domain=[HOMENETWORK] OS=[Unix] Server=[Samba 3.0.28a]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (home server (Samba, Ubuntu))
        print$          Disk      Printer Drivers
Domain=[HOMENETWORK] OS=[Unix] Server=[Samba 3.0.28a]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
        WORKGROUP            COMPUTER_1

5. Create your first share for everyone can access and write to as in samba02.png
Before to do in samba02.png make sure you create the path with full permission to everyone
root@test:~# mkdir /home/Public
root@test:~# chmod 777 /home/Public/

In share menu, type Public in Create Share and Press Create, then you have all parameter for configuration for this share. Just config as in samba02 and you will have public share for everyone with write permission (Dont remember to click commit changes)
Retest with smbclient
root@test:~# smbclient -U% -L localhost
Domain=[HOMENETWORK] OS=[Unix] Server=[Samba 3.0.28a]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (home server (Samba, Ubuntu))
        Public          Disk      Share for everyone     <------------- You see this new created share
        print$          Disk      Printer Drivers
Domain=[HOMENETWORK] OS=[Unix] Server=[Samba 3.0.28a]

6. Create 5 unix user in system, 1 group 5boss
root@mail:~# groupadd 5boss
root@test:~# useradd user1
root@test:~# useradd user2
root@test:~# useradd user3
root@test:~# useradd user4
root@test:~# useradd user5
root@test:~#mkdir /home/5Boss
root@test:~# chown root:5boss /home/5Boss/
root@test:~# chmod 770 /home/5Boss/   <----  (2 lines to allow users in 5boss group have full permision to physical folder)
root@test:~# usermod -a -G 5boss user1 (Use can do it in the useradd command but I split it out for you to easy to understand)
root@test:~# usermod -a -G 5boss user2
root@test:~# usermod -a -G 5boss user3
root@test:~# usermod -a -G 5boss user4
root@test:~# usermod -a -G 5boss user5

7. Create 5 users for your need share as in samba05.png

8. Create a share for this 5 users in samba06.png
In this screenshot, I give all option for you to see, not all option at all. You can you a valid users option is enough for simple use.

root@test:~# smbclient -U% -L localhost
Domain=[HOMENETWORK] OS=[Unix] Server=[Samba 3.0.28a]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (home server (Samba, Ubuntu))
        5Boss           Disk      Share for 5 user only    <---- New Share
        Public          Disk      Share for everyone
        print$          Disk      Printer Drivers
Domain=[HOMENETWORK] OS=[Unix] Server=[Samba 3.0.28a]


Author Comment

ID: 24343053
This works perfectly! I have one more question, if I want to have a separate private folder for each user, is it enough to do this:

chown root /home/user1
chown root /home/user2
chown root /home/user3
chown root /home/user4
chown root /home/user5

and then follow samba6.png for every private share.

If something goes wrong, I suppose you just need to go root, and then you can access the files which are normally private, is that right?

Expert Comment

ID: 24344054
Yes, if you want private for each user, you can use this as home folder of each user.

then you should

chown user1 /home/user1 and chmod 700 /home/user1  (It means only user1 have full access to this folder, group user and other cannot)

Yes, if anything go wrong, root account can solve everything :D

Good luck.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Have you ever stumbled upon a software that is so great that you just love? It happened to me. Love at first sight. Filezilla Server.   Ok its not the most advanced ftp server I've came across. But its a fairly simple piece of software to get the …
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Suggested Courses

630 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