The best definition I found for Samba goes this way "Samba is an important component to seamlessly integrate Linux/Unix Servers and Desktops into Active Directory environments using the winbind daemon".In simple words, Samba is the standard Windows interoperability suite of programs for Linux and Unix.Since long back in 1992, Samba has provided secure, stable and fast file and print services for all clients using the SMB/CIFS protocol, such as all versions of DOS and Windows, OS/2, Linux and many others.
Today we are going to setup a simple samba share.
Setting Up a Simple Samba Share which can be accessed by anyone who has account on the Machine.
Backup the smb.conf file
------------------------------------------
Locating the Correct Samba configuration File:
[root@rhel samba]# smbd -b | grep smb.conf
CONFIGFILE: /etc/samba/smb.conf
[root@rhel samba]#
[root@rhel ~]# cd /etc/samba/
[root@rhel samba]# cp smb.conf smb.conf.orig
[root@rhel samba]# > smb.conf
[root@rhel samba]# vi smb.conf
Add a simple Homes Share in smb.conf
------------------------------------------------------
[root@rhel samba]# cat smb.conf
[global]
workgroup = MIDEARTH
[homes]
guest ok = no
read only = no
[root@rhel samba]#
[root@rhel samba]# service smb restart
Shutting down SMB services: [FAILED]
Shutting down NMB services: [FAILED]
Starting SMB services: [ OK ]
Starting NMB services: [ OK ]
[root@rhel samba]#
Add a user called Jen
-----------------------------
[root@rhel samba]# useradd jen
[root@rhel samba]# passwd jen
Changing password for user jen.
New UNIX password:
BAD PASSWORD: it is WAY too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
Provide him with smb credentials(this is different from normal user/pass credentials)
[root@rhel samba]# smbpasswd -a jen
New SMB password:
Retype new SMB password:
Added user jen.
[root@rhel samba]#
Go to Start > Run > \\MachineIP
Login in through user/pass
Successfull !!!
You can see home directory [homes] and jen own home directory
Testing Your Samba Share
-------------------------
[root@rhel samba]# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = MIDEARTH
[homes]
read only = No
[root@rhel samba]#
List Shares Available on the Server
-----------------------------------------------
[root@rhel samba]# smbclient -L rhel -U jen
Password:
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]
Sharename Type Comment
--------- ---- -------
homes Disk
IPC$ IPC IPC Service (Samba 3.0.25b-0.4E.6)
jen Disk Home directory of jen
Domain=[rhel] OS=[Unix] Server=[Samba 3.0.25b-0.4E.6]
Server Comment
--------- -------
Workgroup Master
--------- -------
MIDEARTH BL07DL380G5
Done. Your first samba share is Ready !!!
No comments:
Post a Comment