0% found this document useful (0 votes)
12 views4 pages

New SMB

Uploaded by

nisekey113
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views4 pages

New SMB

Uploaded by

nisekey113
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Accessing Network Storage with SMB

SMB- server message block


This protocol is called CIFS
CIFS----common internet file system
CIFS is default file system for windows
To share data for windows systems, SMB server needs to be created on Linux server.
To enable cross platform data sharing SMB server is used.
Port No: - 445 TCP
SMB Server Configuration Steps
Create yum server
#rpm –qa | grep samba [to check samba service is installed or not]
#yum install samba* [to install samba server services]
#mkdir /shared [created a directory
#vim /etc/samba/smb.conf [main configuration file for SMB]
In shared definition section
[shared]
Path = /shared
Browseable = yes
Writable = yes
valid users = student [only student user can access share directory]
host allow = 192.168.0. [Only this N/W can access share]
Note: - By default in SAMBA server, home directory and printers are shared.
#testparm [to verify shared is proper in config file]
#chmod 777 /shared
#touch /shared/test.txt
#chmod 666 /shared/test.txt
#iptables –F
#systemctl stop iptables
#systemctl disable iptables
#setenforce 0
#systemctl start smb nmb
#systemctl enable smb nmb
#systemctl start winbind
#systemctl enable winbind
Now create User (here, Student)
#smbpasswd –a student
Enter SMB password
#smbclient //192.168.33.1/shared –U student
Enter password of Samba password of student user
#ls [to view shared directory and file]
#? [to view how many commands you can execute
here]
Press “ctrl+d” to exit

Now you can access shared directory from windows platform


Now go on client
For Manual Mount
Install samba-client and cifs utils
Create yum server
#yum install samba-client
#yum install cifs-utils
#smbclient –L //192.168.33.1
Enter root password blank enter
#mkdir /smb-dir [create mount point]
#mount –t cifs –o username=student //192.168.33.1/shared/ /smb-dir
Enter student samba password
#mount [to verify]

For automatic mount


#umount /smb-dir
Create credentials file
#mkdir /secure
#vim /secure/student.smb [extension will be .smb]
username=student
password=redhat
domain=MYGROUP
Save and quit
#chmod 770 /secure
#chmod 600 /secure/student.smb
#vim /etc/fstab
//192.168.33.1/shared /smb-dir cifs credentials=/secure/student.smb 00
Save and quit
#mount –a
#mount [verify]
Automount with autofs
#umount /smb-dir
#yum install cifs-utils autofs
#vim /etc/auto.master.d/shares.autofs
/smb-dir /etc/auto.shares
Save and quit
#vim /etc/auto.shares
data -fstype=cifs,credentials=/secure/student.smb ://192.168.33.1/shared
Save and exit
#systemctl restart autofs
#ls /smb-dir/data

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy