Wednesday, January 6, 2016

Samba Configuration in RHEL 6


1. Create repo and install packages.

2. yum install samba*

3. Restart services:
# /etc/init.d/smb restart
# /etc/init.d/nmb restart
# /etc/init.d/winbind restart

# chkconfig smb on
# chkconfig nmb on
# chkconfig winbind on

4. Create users in the system:
# useradd panuser
# passwd panuser

# useradd dradmn
# passwd dradmn

5. Create same users in Samba:
# smbpasswd -a panuser
# smbpasswd -a dradmn

6. Add users in Samba group:
# groupadd smbgroup
# usermod -G smbgroup panuser
# usermod -G smbgroup dradmn

7. Edit conf file:
# vim /etc/samba/smb.conf

In "Global Settings" sectin, write:
In "Network Related Options" section write:
workgroup = hbctxdom

In "Share Definitions"section write:
[LinuxShare]
path=/tmp/TAD4D/
writeable = yes
browseable = yes
public = yes
valid users = panuser, dradmn

8. Restart all the required services

9. To list share from Samba server with:
# smbclient -L 10.226.220.36 -U dradmn

Output:
[root@rhel6test ~]# smbclient -L 10.226.220.36 -U dradmn
Enter dradmn's password:
Domain=[HBCTXDOM] OS=[Unix] Server=[Samba 3.6.23-12.el6]

        Sharename       Type      Comment
        ---------       ----      -------
        LinuxShare      Disk
        IPC$            IPC       IPC Service (Samba Server Version 3.6.23-12.el6)
        dradmn          Disk      Home Directories
Domain=[HBCTXDOM] OS=[Unix] Server=[Samba 3.6.23-12.el6]

        Server               Comment
        ---------            -------
        CRMNEXTUAT1
        RHEL6TEST            Samba Server Version 3.6.23-12.el6

        Workgroup            Master
        ---------            -------
        CITRIXDOM            HBNBUUAT
        HBCTXDOM             RHEL6TEST
        HDFCBANK             FINNAPPBRA03
        UCP                  BACKUPDEMO

No comments:

Post a Comment