HOW TO INSTALL SAMBA ON FREEBSD. SAMBA INSTALLATION PRIMER FOR FREEBSD OS. PROCEDURE LIST FOR BEGINNERS, CHEAT SHEET FOR FREEBSD / SAMBA NEWBIES, INSTALL SAMBA / FREEBSD CHEATSHEET FOR NEWBIE * FREEBSD SAMBA INSTALLATION PRIMER FOR BEGINNERS * SETUP SAMBA 3.0.7 / FREEBSD 4.9 PROCEDURE LIST. CONFIGURE FILESERVER ON FBSD OPERATING SYSTEM. SET UP, CONFIGURATION, TUTORIAL, HOWTO, ADMINISTRATOR'S SETUP GUIDE, TIPS AND TRICKS CHEETSHEET, STEP BY STEP INSTRUCTIONS TO INSTALL SAMBA ON FREEBSD


How to Install Samba on FreeBSD.  Samba Installation Primer for FreeBSD OS.  Procedure List for Beginners, Cheat Sheet for FreeBSD / Samba Newbies, Install Samba / FreeBSD Cheatsheet for Newbie * FreeBSD Samba Installation Primer for Beginners * Setup Samba 3.0.7 / FreeBSD 4.9 Procedure List. Configure Fileserver on FBSD Operating System. Set Up, Configuration, Tutorial, Howto, Administrator's Setup Guide, Tips and Tricks Cheetsheet, Step by Step Instructions to install Samba on FreeBSD
How to Install Samba on FreeBSD(TM)

HOW TO INSTALL SAMBA ON FREEBSD


    ASSUMPTIONS:

  1. You are familiar with computers, and probably know either Windows or Linux fairly well.

  2. You have already installed FreeBSD.  If not, then click here: How to Install FreeBSD

  3. You have configured the FreeBSD shell.  If not, then click here: How to Configure the FreeBSD Shell

  4. Your 'ports tree' is up to date.  If you don't know, then it probably isn't current.  Update the ports tree by issuing one of these commands: Update the Ports Tree Using CVSup

  5. Here is how to configure your computer so that CVSup is run on a regular basis


    NOTE WELL:

  6. In the Samba configuration file, (as is true with many Unix type files), a hash/pound sign '#', and a semi-colon ';' at the beginning of a line means that the computer should ignore the rest of the line.  Typically, these 'ignore' characters are for your benefit--they usually contain comments about what is taking place. Hence, when a line begins with # or ; it is 'commented out'. Sometimes double slashes '//' have the same 'ignore' effect--it just depends on what type of program is reading the file.

    BEGIN INSTALLATION

  7. You can find samba in the this directory:

    /usr/ports/net/samba3
    At the present time (2004 September) '/samba3' will contain the 3.x series.  '/samba' will contain 2.x series, which is obsolete.

  8. Enter:

    make install
  9. Will look for file and download it from an FTP server if the file doesn't happen to be already in /usr/ports/distfiles/.  The current version of the file (2004 September) is 3.0.7,1 and the file name is samba-3.0.7.tar.gz.

  10. Once the file is downloaded and checked for integrity, the screen shows a number of options:

    Options for samba 3.0.7,1
    [X] LDAP                      With LDAP support
    [X] ADS                       With Active Directory support
    [X] CUPS                      With CUPS printing support
    [X] WINBIND                   With WinBIND support
    [ ] ACL_SUPPORT               With ACL support
    [ ] SYSLOG                    With Syslog support
    [ ] QUOTAS                    With Quota support
    [X] UTMP                      With UTMP support
    [ ] MSDFS                     With MSDFS support
    [ ] SAM_XML                   With XML smbpasswd backend
    [ ] SAM_MYSQL                 With MYSQL smbpasswd backend
    [ ] SAM_PGSQL                 With PostgreSQL smbpasswd backend
    [ ] SAM_OLD_LDAP              With Samba2.x LDAP smbpasswd backend
    [ ] PAM_SMBPASS               With SMB PAM module
    [X] POPT                      With installed POPT library

  11. Leave options as they are

  12. Tab to OK, press enter.


    AUTOMATED EXTRACTION AND INSTALLATION

  13. Will say:

    Extracting samba-3.0.7,1
    or similar.

  14. Screen shows:

    Options for gettext:

    [X] Examples
    [X] HTML
    Check both options

  15. Press Enter.

    Will then go on showing lots of lines of messages as it builds.  It will download any program/file that it depends on, including autoconf.

  16. It is possible that the 'make install' process will not complete successfully.  If this happens, go to: 'make install' fails on FreeBSD

  17. After Samba has been installed, you should see something like this:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/bin/testprns
    /usr/local/bin/smbcquotas
    /usr/local/bin/smbcacls
    /usr/local/bin/wbinfo
    /usr/local/bin/smbtree
    /usr/local/bin/smbspool
    /usr/local/bin/smbpasswd
    /usr/local/bin/testparm
    /usr/local/bin/smbcontrol
    /usr/local/bin/ntlm_auth
    /usr/local/bin/net

    This port has installed the following startup scripts which may cause
    these network services to be started at boot time.
    /usr/local/etc/rc.d/samba.sh

    If there are vulnerabilities in these programs there may be a security
    risk to the system. FreeBSD makes no guarantee about the security of
    ports included in the Ports Collection. Please type 'make deinstall'
    to deinstall the port if this is a concern.

    For more information, and contact details about the security
    status of this software, see the following webpage:
    http://www.samba.org/
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


    COPY SAMBA CONFIGURATION FILE

  18. When Samba was installed, it created a a default configuration file in:

    /usr/local/etc/
    Oddly enough it is called:

    smb.conf.default
    Also, there is a copy here as well:

    /usr/ports/net/samba3/work/samba-3.0.7/examples/smb.conf.default
    Since the system needs the file to be named 'smb.conf', let's make a copy:

    cd /usr/local/etc/
    cp -p smb.conf.default smb.conf


    EDIT SAMBA CONFIGURATION FILE

    In order for Samba to work we need to edit this file a bit. So, let's fire up Pico:

    pico smb.conf

  19. Item: 'workgroup'

    Change from "MYGROUP" to whatever the name your workgroup is.

    example:

    workgroup = XYZworkgroup

  20. Item: 'server string'

    Change the server string to whatever is appropriate. Here are some possibilities:

    %h Samba Server
    %h-the-FreeBSD-Samba-Server
    %h Samba
    %h_Samba_File_Server_1
    '%h' is a variable for the name of the Host computer that Samba is running on.

  21. Item: 'log file'

    The default line is:

    log file = /var/log/samba/log.%m
    The %m is a variable for the client logging in. You can use the default naming convention, or perhaps something like this:

    log file = /var/log/Samba-%m.log


    CONFIGURE FOR INDIVIDUAL USER'S LOGIN PATH

  22. Go down until you see:

    ========================== Share Definitions ==========================

  23. Let's set up the users so that they cannot obliterate their configuration files.  The first section is:

    [homes]
       comment = Homes Directories
       browseable = no
       writable = yes
    Let's change this to:

    [homes]
       comment = Home directory for %u on %h
       browseable = no
       writable = yes
       path = /usr/home/%u/Docs
       valid users = %S

  24. Let's do the public section.  Just below the commented out section called [public] (just before the '# Other examples' section), let's add a public directory that can be read from and written to by all users:

    # A publicly accessible directory, that can be read from
    # or written to by all valid users.
    [public]
       comment = %h Shared Public Directory
       path = /usr/home/samba/public
       force directory mode = 0777
       force create mode = 0777
       force group = nobody
       force user = nobody
       public = yes
       writeable = yes
       read only = no
  25. Save this file, and exit Pico:

    Ctrl-O

    Press enter

    Ctrl-X

  26. Now let's test the file for typos and other errors:

    /usr/local/bin/testparm | more
    If you don't see any error messages, then it's good to go.

  27. Next, let's create those directories that we referenced just a bit ago:

    cd /usr

    mkdir home

    cd home

    mkdir samba

    cd samba

    mkdir public

    cd public

  28. Let's reboot the computer:

    shutdown -r +1
  29. Wait until the computer reboots, then log in again.

  30. In order for the users to be able to use Samba on this computer, they have to be added to 2 user databases. The first is the OS database, and the second is the Samba user database.


    CREATE ACCOUNTS ON FREEBSD FOR WINDOWS USERS

  31. For each of your users, add them to the OS database.  After you have entered your first user, the system will ask you if you have more users to enter.  Enter them all.  Start this process by entering:

    adduser -v

    If it's the first time you have used the 'adduser' command, you should see the following:

    /etc/adduser.conf: No such file or directory
    Use option ''-silent'' if you don't want to see all warnings and questions.

    Check /etc/shells
    Check /etc/master.passwd
    Check /etc/group
    Usernames must match regular expression:
    [^[a-z0-9_][a-z0-9_-]*$]

    Press the enter key if you agree or enter the following if your Windows users have capitalized usernames:

    ^[A-Za-z0-9_][a-z0-9_-]*$
  32. Shows:

    Enter your default shell: csh date no sh tcsh zsh [sh]:
    Enter:

    csh
  33. Shows:

    Your default shell is: csh -> /bin/csh
    Enter your default HOME partition: [/home]:

    Press enter.

  34. Shows:

    Oops, /usr/home already exists.
    Create symlink: /home -> /user/home
    Copy dotfiles from: /usr/share/skel no [/usr/share/skel]:
    Press enter.

  35. Shows:

    Send message from file: /etc/adduser.message no
    [/etc/adduser.message:]
    Press enter.

  36. Shows:

    Create ``/etc/adduser.message''? (y/n) [y]:
    Press enter.

  37. Shows:

    Use passwords (y/n) [y]:
    Press enter.

  38. Shows:

    Write your configuration to /etc/adduser.conf? (y/n) [y]:
    Press enter.

  39. Shows:

    Ok, let's go.
    Don't worry about mistakes.  I will give you the chance later to correct any input.
    Enter username [[^[a-z0-9_][a-z0-9_-]*$]]:
    Enter the user name of the Windows user (we will user 'winuser' as an example here):

    winuser
  40. Shows:

    Enter full name []:
    Enter the user's full name:

    Windows Q. User
  41. Shows:

    Enter shell csh date no sh tcsh [csh]:
    Press enter:

  42. Shows:

    Enter home directory (full path) [/home/winuser]:
    Press enter.

  43. Shows:

    Uid [1xxx]:
    Press enter.

  44. Shows:

    Enter login class: default []:
    Press enter

  45. Shows:

    Login group winuser [winuser]:
    Press enter.

  46. Shows:

    Login group is ``winuser''. Invite winuser into other groups: guest no [no]:
    Press enter to accept the default 'no'.

  47. Shows:

    Enter password []:
    Enter the password that 'winuser' uses to log into Windows.  If there is no password, then just press enter.

  48. Shows:

    Name:     winuser
    Password: ****
    Fullname: Windows Q. User
    Uid:      1000
    Gid:      1000 (winuser)
    Class:
    Groups:   winuser
    HOME:     /home/winuser
    Shell:    /bin/csh
    OK? (y/n) [y]:

    Press enter if everything looks OK.
  49. Shows:

    Send message to ``winuser'' and: no root second_mail_address [no]:
    Press enter.

  50. Shows:

    winuser,

    your account ``winuser'' was created. Have fun!

    See also chpass(1), finger(1), passwd(1)

    Add anything to default message (y/n) [n]:
    Press enter to accept default.

  51. Shows:

    Send message (y/n) [y]:
    Press enter.

  52. Shows:

    Copy files from /usr/share/skel to /home/winuser
    Add another user? (y/n) [y]:
    If you have more users to enter, then press enter. Otherwise, type 'n' then press enter.


    CREATE ACCOUNTS ON SAMBA FOR WINDOWS USERS

  53. Now that the users have been created on the operating system, we can allow those users to access Samba.  For each of your users cycle through this process which is started by entering (again, substitute your user for 'winuser'):

    smbpasswd -a winuser
  54. Shows:

    New SMB password:
    Enter the Windows password.

  55. Shows:

    Retype new SMB password:
    Re-enter the Windows password.

  56. The first time you enter a Samba user name you will see this message:

    startsmbfilepwent_internal: file /usr/local/private/smbpasswd did not exist.  File successfully created.
  57. Shows:

    Added user winuser
    Repeat the 'smbpasswd -a winuser' command for all of your users to enter them in the Samba users database.


    SET SAMBA SO THAT IT LOADS ON BOOT UP

  58. In the /etc directory, there is a file called 'rc.conf'.  We will need to add a line in this file so that Samba is run when booting up.

    Enter:

    cd /etc
  59. Let's back up the existing file:

    cp -p rc.conf rc.conf.1.bak
  60. To edit, enter:

    pico rc.conf
  61. Just below 'usbd_enable="YES"' and before '# This file now contains...' let's add these 2 lines:

    # Start up the Samba file server program using /usr/local/etc/smb.conf
    samba_enable="YES"

  62. To save the file and exit:

    Ctrl-O

    Press enter

    Ctrl-X
  63. Reboot by entering:

    shutdown -r +1

    SET PERMISSIONS FOR SAMBA SHARED DIRECTORIES

  64. Since we are allowing anyone to do anything in the public directory, let's set file permissions appropriately.  Enter:

    cd /usr/home/samba
  65. To give Read, Write and eXecute permissions to the user, enter:

    chmod u=rwx public
  66. To give Read, Write and eXecute permissions to the members of the Group, enter:

    chmod g=rwx public
  67. To give Read, Write and eXecute permissions to all Others, enter:

    chmod o=rwx public
  68. Let's create the users' 'Docs' directories:

    cd /usr/home

    ls -lt
    Looking at the list, you should see the names of the users that you set up.  For each user, we will now create a 'Docs' directory.  Substitute each of your users for 'username' in the following:

    mkdir username/Docs
  69. Now since we created all these 'Docs' directories as 'root', let's give ownership to the user.  For each user ('username'), do the following:

    chown username username/Docs
  70. Now, all of the users are set up.  Go to a Windows computer and double-click on 'Network-Neighborhood'.  You should be able to navigate to your new Samba server!





Here are some other FreeBSD related links:
How to Install FreeBSD

Shell Configuration

FreeBSD Device List

Hardware Burn-In Test Using FreeBSD

FreeBSD Commands Cheat Sheet

'make install' fails on FreeBSD

The FreeBSD 'Handbook' online

Search for Answers to Questions about FreeBSD

How to Install NTP (Network Time Protocol) software on FreeBSD

How to Install Samba file server software on FreeBSD

Mounting and Using the Floppy Drive in FreeBSD

Mounting and Using the CD-ROM Drive in FreeBSD

How to Find or Search for a Directory or a file

How to Preserve the Date and Time Stamp When Copying Files

How to Copy Files, and Directories recursively in FreeBSD / unix

How To Fix The 'Read Only File System' Problem When rc.conf is Corrupted on Freebsd

Random Passwords Generator

URL Decoder / Link Maker


AT YOUR OWN RISK: These instructions have no guarantee or warrantee of fitness for any purpose whatsoever--and none shall be implied or inferred.  If you use these and incur any kind of damage--it is your responsibility.




















How to Install Samba on FreeBSD. Windows file sharing Win XP 2000 2K NT. Fileserver file server Network Printing. Share Printer mount computers shares. Set up setup configure port installation. Fileserving serving files service browsing. Primer procedure list newbies beginner. Howto CUPS Unix machines Linux options. Directions steps step-by-step instructions. Cheat Sheet for FreeBSD Samba Installation. Primer for Beginners to Load Samba on FreeBSD. Newbies Installing Samba on FreeBSD Guide. Install and setup Samba on the FreeBSD flavor of UNIX / Linux


Info on Web Design:
Web Design FAQ  |   Ecommerce  |   Inquiry Form


Info on Web Hosting:
Web Hosting FAQ  |   Inquiry Form


Info on Marketing:
Copywriting  |   Publicity  |   Search Engines


Home Page

CONTACT US TODAY!   Info@US-Webmasters.com

Toll-Free Phone: 1-877-US-WEBMASTERS
 (1-877-879-3262)

Copyright © 1998-2014 US-Webmasters.com (TM) - All Rights Reserved

US-Webmasters.com(TM), US-Webmasters(TM), & USWebmasters(TM) are trademarks of US-Webmasters.com(TM).


Start here to find it fast!(TM)