You are here
Home > Redhat > Samba Services

Samba Services

Authentication and authorization of users

File and printer sharing

Name resolution


Samba daemons

Nmbd : NETBIOS name server

Resource browsing

WINS Server

Smbd : SMB/CIFS Server

Authentication and authorization

File and printer sharing

Ports : 137/udp, 138/udp, 139/tcp

Configuration : /etc/samba/smb.conf

Samba Files : /etc/samba

Know about smb.conf

1. [global] : This is for global settings

2. [homes] : Used to grant some or all users access to their home directories

3. [printers] : Defines printer resource and services

#; : Comment Entries

Configuring File & Directory Sharing

Share name cane be specified within [ ] Example [sambashare] this is called share name.

Share options

1. public – Share can be accessed by guest

2. browseable – share is visible in browse lists

3. writable – Read & write enabled

4. printable – To enable printer resource

5. group – Share can be used the specified group as their primary group

Authentication method

Specified with security = < method >

User : validation by user and password [ This is default ]

Server : Another server authenticates

Share : user validation on per-share basis

Domain: A collection of workgroup or domain authentication data can be used.
Example security = user

To create a samba user

First step unix user has to be created.

Add the user into smbpasswd

# smbadduser

# smbpasswd –a < user name >

It ask for samba user password. Password has to be set and user name passwd will be stored in the /etc/samba/smbpasswd

Samba client tool

This is can be used by ftp style

# smbclient //machine/service

> cd < Directory Name >

> get file

# smbclient –L hostname To view of shared services

# smbclient –L hostname –U <username> It asks for the remote server password to authenticate the remote server.

# smbmount To mount a SMB-shared resource

# smbmount //server/share /mnt/smb -o username =smbuser

# smbmount [remote server share] [ mount point ] -o username=sambausername

# mount -t smbfs -o username=USER,password=PASS //server/share /mnt/share

# findsmb =find smb host on the network

# smbtree equivalent to network neighborhood /my network work plce

# smbget similar to wget in that it download the file

# smbget –u <username> smb://<ip address> /sharename/file name

# smbclient -> interactive like [ftp –like utility to connect to shates permits   upload/downloads from shares

# smbclient –U dean //

mget download files

mput upload files

# smbtar – backup smb shares to tar archive

# smbtar –s < server name or ip address> -x <share name> -u user name
–p ‘pass1234’ –t backup.tar

Leave a Reply

17 − 5 =