Hello and welcome to CertForums.co.uk, here we host free active certification forums with links to the best free resources for Microsoft's MCSA MCSE MCDBA Cisco's CCNA CCDA and CCNP, and CompTIA's A+ Network+ i-NET+ and Security+ certifications in the UK. If you wish to post or use other advanced features you will need to register first. Registration is absolutely free and takes only a few minutes to complete so sign up today!

If you have any problems with the registration process or your account login, please contact support

Go Back   CertForums > Computing Support Forums > Linux / Unix Discussion
Home Forums Register Search Today's Posts Mark Forums Read

SAMBA Server HOWTO

Post New ThreadReply
 
Thread Tools Display Modes
  #1  
Old 12-Jun-2006, 12:54 PM
zimbo's Avatar
zimbo zimbo is offline
Resident Greek Mafia Boss
Posts: 5,200
Points: 1333 zimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 points
Power: 71
None
Join Date: 10 Jul 2005
Location: London & Cyprus
Age: 23
Certifications: MCDST & MCSA
WIP: B.Sc Computer Networks, CCENT
SAMBA Server HOWTO

Quote:
For those of you who don’t know what samba is it is a free software implementation of Microsoft's networking system released under the GNU General Public License. As of version 3, Samba not only provides file and print services for various Microsoft Windows clients but can also integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a Domain Member. It can also be part of an Active Directory domain.

Samba runs on most Unix and Unix-like systems, such as GNU/Linux, Solaris, and the BSD variants.
Im going to show you a very simple demonstration on what the magic of samba can do. This is just a very tiny example and it is not by all means best practise methods. Your server will be insecure so this is not suitable for enterprise enviroments - like i said its to show you what samba can do.

Im assuming for you to be trying this you must either know a little linux or learning as you going along - i will be using debian as the distro.


First of all make sure you have the samba package installed if not:

Code:
apt-get install samba
After the packages have been obtained a short set up routine will automatically start. Answer the prompts as follows:
  • Enter your Workgroup or Domain name
  • Answer Yes to encrypted passwords
  • Answer No to "get WINS settings from DHCP" - assuming you are running a DHCP server (i.e. from a router like me)
  • Choose to run Samba as daemons
  • Answer Yes to create the Samba passwords file

The Samba configuration files were installed in the following directory:

Code:
/etc/samba
Now using your favourite text editor edit the smb.conf file for example:
Code:
vi /etc/samba/smb.conf
And make the following changes in BOLD BLUE:

Code:
[global]
   workgroup = YOURWORKGROUPNAME
   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/ftp
   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
Now i suggest you restart the operating system.

Next you should add a new user using the adduser command and give the details you are asked.
You will now have to assign this users samba password so:

Code:
smbpasswd -a username
and provide a password.

Now login into the debian system using the user you just create using their normal credentials. Create a folder in that users /home directory and assign the user
Code:
chmod u+wrx
Now on a Windows machine make sure that Windows client is on the same IP range and that it has the same workgroup name as the debian machine. Open Network Places and there should be a machine with the name of the debian machine. Double click and enter your username and SAMBA password you created. And you will see you can now read,write and store all your files on the linux server.



Cert Goals for 2008/2009
CCNA
CHFI
 
Reply With Quote
  #2  
Old 16-Jun-2006, 06:32 PM
Mitzs's Avatar
Mitzs Mitzs is offline CertForums News Posting Member
Lifetime Member
Posts: 2,958
Points: 1995 Mitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 pointsMitzs has over 1500 points
Power: 54
None
Join Date: 11 Apr 2005
Location: Tenneesse USA
Certifications: Microcomputers and network specialist.
I'm not a Linux user myself, but I would think this would be great for those that are just starting out. But I know someone that might have a use for this down the road. I will pass it on to them. Thanks for taking the time to do this zimbo.


Don't walk in front of me, I may not follow. Don't walk behind me, I may not lead. Walk beside me and just be my friend. (Old Irish Proverb)
 
Reply With Quote
  #3  
Old 16-Jun-2006, 06:35 PM
zimbo's Avatar
zimbo zimbo is offline
Resident Greek Mafia Boss
Posts: 5,200
Points: 1333 zimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 pointszimbo has over 1000 points
Power: 71
None
Join Date: 10 Jul 2005
Location: London & Cyprus
Age: 23
Certifications: MCDST & MCSA
WIP: B.Sc Computer Networks, CCENT
by all means mitz post it where you want and tell everyone! I know i take them to the *daft-level* but thats who im hoping will read them... someone starting out and needing to be shown everything.



Cert Goals for 2008/2009
CCNA
CHFI
 
Reply With Quote
Post New ThreadReply Spread this thread: Submit this thread to digg Submit this thread to del.icio.us


Go Back   CertForums > Computing Support Forums > Linux / Unix Discussion


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing a CA Ally Security Exams 2 21-Jan-2006 11:21 AM
Evaluation MS Operating systems Boyce Training & Development 13 01-Nov-2005 08:19 PM
Windows Server 2003 Deployment Mitzs General 1 04-May-2005 07:06 AM
CertForums 70-228 & 70-229 Forum FAQ Page Phil SQL Exams 0 19-Nov-2003 06:24 AM


All times are GMT. The time now is 10:37 PM.

Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
CertForums.co.uk (C) copyright 2003-2007 All Rights Reserved. Content published on CertForums.co.uk requires permission for reprint.
Hosted by Lunarpages