Anna University Results November - December 2011 available with your GPA only for Credit System

Exam Results 2012

Exam Results 2012 Inspirational Quotes

Sunday, August 21, 2011

Installing Samba Software package


Installing Samba Software Package :

Aim:

To know the how to install the packages like Samba

1. Samba Installation and Configuration

1.1 Introduction to Samba

Samba can be used with Linux to provide transparent access between machines running Linux and machines running Windows. Samba itself runs on a Linux machine and makes shared files and printers available to Windows machines, as if they are available on a
Window machine or server. Thus, Samba has several practical applications which can
generally be categorized as follows:

1. Using a Linux server as a simple peer-to-peer server. There is no user authentication involved and no need for passwords.

2. Using a Linux server as a member server on an existing Windows NT domain. The existing Windows domain controller will use NT authentication tools to control file permissions and access.

3. Using a Linux server as a primary domain controller with its own user authentication and control mechanisms.

Which of these three applications of Samba is used, determines how Samba is configured on the Linux machine.

1.2 Installing Samba

$ su -
Enter Password:
(Here enter the root password)

To install Samba package type the following command in the Terminal

$ yum install samba

In order to make Samba Service start automatically whenever the system boots, type

chkconfig --levels 235 smb on

To check the samba service running status type the following

$ /etc/init.d/smb status

To Start the Samba service

$ /etc/init.d/smb start

To Restart the Samba service

$ /etc/init.d/smb restart

Creating a normal user

$ useradd samba-test
  
1.3 Configuring samba :

Creating a normal user
$ useradd samba-test
Setting the password
$ passwd samba-test

Changing password for user samba-test.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

Adding the user to access samba shares with a password

 $ smbpasswd -a samba-test
New SMB password:
Retype new SMB password:
Added user samba-test.

Login into the samba as using the smbclient to add the files and folders to share with windows.


$ smbclient \\\\localhost\\samba-test –U samba-test

Here enter smb password for login
Enter samba-test's password:
You gets the following output to see the what are files you are sharing
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.5.8-68.fc15]
smb: \>


In this to see what are files you sharing enter ‘ls’ command

smb: \> ls

. D 0 Tue Aug 9 19:08:44 2011
.. D 0 Tue Aug 9 19:08:44 2011
.bash_logout H 18 Wed Jun 22 19:19:05 2011
.mozilla DH 0 Wed Feb 9 03:52:39 2011
.bash_profile H 193 Wed Jun 22 19:19:05 2011
.gnome2 DH 0 Tue Feb 8 14:08:01 2011
.bashrc H 124 Wed Jun 22 19:19:05 2011
56633 blocks of size 2097152. 7531 blocks available

To see the where your current directory located enter the ‘pwd‘ command

smb: \> pwd
Current directory is \\localhost\samba-test\

To create a folder in sharing folder enter following command

smb: \> mkdir test

To check created directory enter the following command

smb: \> ls
. D 0 Tue Aug 9 19:10:50 2011
.. D 0 Tue Aug 9 19:08:44 2011
.bash_logout H 18 Wed Jun 22 19:19:05 2011
.mozilla DH 0 Wed Feb 9 03:52:39 2011
.bash_profile H 193 Wed Jun 22 19:19:05 2011
.gnome2 DH 0 Tue Feb 8 14:08:01 2011
test D 0 Tue Aug 9 19:10:50 2011
.bashrc H 124 Wed Jun 22 19:19:05 2011
56633 blocks of size 2097152. 7532 blocks available

If you want to come out from samba client enter the ‘exit’

smb: \> exit


How to access the shared files from windows.

Open the samba location from windows as following.

Start-> Run..

Enter the IP Address of fedora linux machine as following

eg: \\192.168.1.2\

It displays log in window to log into the samba sever.

Here username and password should be what you given to while creating samba username and smb password.

eg:
username: samba-test
password:test@123

Now you can see the what are files shared.


Note :

Error :

NT_STATUS_ACCESS_DENIED

If you get the above error then execute the following command

$ setsebool –P samba_enable_home_dirs 1
(or)
$ setsebool –P samba_enable_home_dirs=on



Hope this will be helpful for you!!!

 Stay tuned for updates. If you find any problem or have any suggestions for improvements, you can always mail me.
By M.Baran Mahamood

No comments: