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.
You can find samba in the this directory:
At the present time (2004 September) ‘/samba3’ will contain the 3.x series. ‘/samba’ will contain 2.x series, which is obsolete.
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.
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
Leave options as they are
Tab to OK, press enter.
AUTOMATED EXTRACTION AND INSTALLATION
Options for gettext:
[X] Examples [X] HTML
Check both options
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.
This port has installed the following startup scripts which may cause these network services to be started at boot time.
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:
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
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
Save this file, and exit Pico:
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.
Next, let’s create those directories that we referenced just a bit ago:
Let’s reboot the computer:
shutdown -r +1
Wait until the computer reboots, then log in again.
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
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:
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:
Enter your default shell: csh date no sh tcsh zsh [sh]:
Your default shell is: csh -> /bin/csh Enter your default HOME partition: [/home]: