WhileNetworking

  • Home
  • CCNA
  • Cisco Packet Tracer Download
    • Cisco packet tracer 6.3
    • cisco packet tracer 6.2
    • Cisco Packet Tracer 7
  • Linux Server Management
  • About Us
  • Privacy Policy
  • Contact Us

Configuring Linux Samba Server

You are most welcome to this post.
Samba Server configuration
Really thanks to you for your interest in this topics. :)

Sometimes you need to configure FTP server for transferring file. There are so many FTP client for Linux OS. here in this post, FTP client of CentOS/Red Hat is mainly discussed. So lets try these process.

Configuring Linux FTP server: Samba Server

 

[ece@localhost Desktop]$ su –

Password:

Last login: Wed May 11 22:45:08 EDT 2016 on pts/0

[root@localhost ~]# yum install samba samba-client cifs-utils -y

Loaded plugins: fastestmirror, langpacks

base                                                     | 3.6 kB     00:00

extras                                                   | 3.4 kB    00:00

updates                                                 | 3.4 kB     00:00

Loading mirror speeds from cached hostfile

* base: centos.excellmedia.net

* extras: mirrors.nwsuaf.edu.cn

* updates: centos.ustc.edu.cn

Package samba-4.2.10-6.el7_2.x86_64 already installed and latest version

Package samba-client-4.2.10-6.el7_2.x86_64 already installed and latest version

Package cifs-utils-6.2-7.el7.x86_64 already installed and latest version

Nothing to do

 

[root@localhost ~]# rpm -qa | grep cifs-utils

cifs-utils-6.2-7.el7.x86_64

 

[root@localhost ~]# groupadd samba-users

 

[root@localhost ~]# mkdir -p /sambashare

 

[root@localhost ~]# echo welcome to samba share zone by whilenetworking.com > /sambashare/welcome

 

[root@localhost ~]# chgrp samba-users /sambashare

 

[root@localhost ~]# chmod 775 /sambashare

 

[root@localhost ~]# ls -ld /sambashare

drwxrwxr-x. 2 root samba-users 20 May 11 23:08 /sambashare

 

[root@localhost ~]# useradd -s /sbin/nologin -G samba-users user1

 

[root@localhost ~]# useradd -s /sbin/nologin -G samba-users user2

 

[root@localhost ~]# useradd -s /sbin/nologin dep

 

[root@localhost ~]# smbpasswd -a user1

 

New SMB password:

Retype new SMB password:

Added user user1.

 

[root@localhost ~]# smbpasswd -a user2

New SMB password:

Retype new SMB password:

Added user user2.

 

[root@localhost ~]# smbpasswd -a dep

New SMB password:

Retype new SMB password:

Added user dep.

 

[root@localhost ~]# vim /etc/samba/smb.conf

 

[root@localhost ~]# nano /etc/samba/smb.conf

 

[root@localhost ~]# testparm

Load smb config files from /etc/samba/smb.conf

rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)

Processing section “[homes]”

Processing section “[printers]”

Processing section “[Project]”

set_variable_helper(yes ; user write access): value is not boolean!

Error loading services.

 

[root@localhost ~]# setenforce 0

 

[root@localhost ~]# systemctl restart smb.service

.

[root@localhost ~]# systemctl enable smb.service

 

ln -s ‘/usr/lib/systemd/system/smb.service’ ‘/etc/systemd/system/multi-user.target.wants/smb.service’

 

[root@localhost ~]# systemctl restart smb.service

Job for smb.service failed. See ‘systemctl status smb.service’ and ‘journalctl -xn’ for details.

 

[root@localhost ~]# systemctl status smb.service

smb.service – Samba SMB Daemon

Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled)

 

[root@localhost ~]# systemctl restart nmb.service

[root@localhost ~]# smbclient -L //192.1698.42.2+X -U user1

Enter user1’s password:

Connection to 192.1698.42.2+X

root@localhost ~]# smbclient -L //192.168.42.2+X -U user1

Enter user1’s password:

Connection to 192.168.42.2+X

[root@localhost ~]# mount -t cifs //192.168.42.129+X/project

 

[root@localhost ~]# mount -t cifs //192.168.42.2+X/project

 

[root@localhost ~]# df -HT

Filesystem             Type     Size Used Avail Use% Mounted on

/dev/mapper/centos-root xfs       19G 4.4G   15G 24% /

devtmpfs               devtmpfs 543M     0 543M   0% /dev

tmpfs                   tmpfs     553M 492k 552M   1% /dev/shm

tmpfs                   tmpfs   553M 7.8M 545M   2% /run

tmpfs                   tmpfs     553M     0 553M   0% /sys/fs/cgroup

/dev/sda1               xfs       521M 130M 391M 25% /boot

/dev/sr0               iso9660   4.4G 4.4G     0 100% /run/media/ece/CentOS 7 x86_64

 

[root@localhost ~]# df -HT

Filesystem             Type     Size Used Avail Use% Mounted on

/dev/mapper/centos-root xfs       19G 4.4G   15G 24% /

devtmpfs               devtmpfs 543M     0 543M   0% /dev

tmpfs                   tmpfs     553M 492k 552M   1% /dev/shm

tmpfs                   tmpfs     553M 7.8M 545M   2% /run

tmpfs                   tmpfs     553M     0 553M   0% /sys/fs/cgroup

/dev/sda1               xfs       521M 130M 391M 25% /boot

/dev/sr0               iso9660   4.4G 4.4G    0 100% /run/media/ece/CentOS 7 x86_64

 

[root@localhost ~]# ls

 

anaconda-ks.cfg

[root@localhost ~]# cd /media

 

[root@localhost media]# ls

 

[root@localhost media]# umount /media

 

Please note the following point:

[root@localhost media]# vim /etc/samba/smb.conf
:set nu
89 workgroup = EXAMPLE-X ; MYHOME to EXAMPLE (BLOCK Letter)
90 server string = Samba Server X ; Server Name
92 netbios name = Fileserver ; remove comment “;”
95 hosts allow = 127. 172.25.11. ; netowrk ID with ‘.’
123 security = user

Note:
security = server or share ; no password required
security = user ; password required

# write down as following share

322 [project] ; share display name
323 comment = RW for samba-users and RO for rakib ; share comment
324 path = /sambashare ; share path
325 browseable = yes
326 writable = yes ; user write access
327 write list = @samba-users ; user print access
328 read only = yes ; access for everyone
329 read list = rakib
hosts allow =
: x (save and quit)

 

Now you can browse from the client part: ——————————
=> Change Work-Group from my computer
=> Change Computer Name
=> Reboot

You can also Browse from Windows PC:

=> Start menu => run => \\192.168.42.2+X (samba IP)

Linux Desktop (Client) to Linux ServerX Access:
[root@desktopX ~]# smbclient -L //192.168.42.2+X -U user1
: 123

* [-N|–no-pass] * [-L|–list HOST] * [-U] — user

Lets see few screen shots of some steps:

Samba Server configuration

Samba Server configuration

Samba Server configuration

Samba Server configuration

Samba Server configuration

Samba Server configuration

Jun 19, 2016Himadri
 

Share with friends :

  • Click to share on Twitter (Opens in new window)
  • Click to share on Facebook (Opens in new window)
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Tumblr (Opens in new window)
  • Click to share on Pinterest (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Skype (Opens in new window)
  • Click to email a link to a friend (Opens in new window)
  • Click to share on Pocket (Opens in new window)
  • Click to share on Telegram (Opens in new window)
  • Click to share on Reddit (Opens in new window)
  • Click to print (Opens in new window)

Related

Network file system (NFS) set up in Linux (CentOS/Red Hat)Free download Cisco Packet Tracer 7 for windows (32 bit), with tutorial version

Leave a Reply Cancel reply

four × 1 =

Himadri

Hi, I'm Himadri. I love blogging with tech topics, specially computer networking. We'll have more fun in the upcoming day. Stay with me. :)

June 19, 2016 8 Comments Linux installation and server managementLinux FTP server configuration, Samba server configuration935
Feel Free to Share :)
0
GooglePlus
0
Facebook
0
Twitter
0
Digg
0
Delicious
0
Stumbleupon
0
Linkedin
0
Pinterest
Find Us on Facebook
Choose a category !!
  • CCNA
  • Cisco Certification Exam
  • cisco packet tracer 6.2
  • Cisco packet tracer 6.3
  • Cisco Packet Tracer 7
  • Cisco Packet Tracer 7.1
  • Cisco Packet Tracer 7.2.1
  • Cisco Packet Tracer 7.3
  • Cyber Security
  • Engineering Ebooks
  • Excel
  • IELTS Ebook
  • Internet
  • Know computer
  • Know your computer
  • Laser Processing of Material
  • Linux installation and server management
  • PDF
  • Technology
  • Uncategorized
Top posts
  • Free download Cisco Packet Tracer 7.1 for windows (32 bit)
  • Free download Cisco Packet Tracer 7.2 for windows (64 bit)
  • Understanding Dynamic Host Configuration Protocol (DHCP) working principle
Archieves
Get latest updates by Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 14 other subscribers
W
SC
wordpress counter
Analytics
Recent Comments
    Browse by categories
    Cyber SecurityLinux installation and server managementCCNAKnow your computerKnow computerCisco Packet Tracer 7UncategorizedCisco Certification ExamInternetPDFCisco Packet Tracer 7.3Engineering EbooksCisco packet tracer 6.3cisco packet tracer 6.2Cisco Packet Tracer 7.1TechnologyExcelLaser Processing of MaterialCisco Packet Tracer 7.2.1IELTS Ebook
    Feel free to contact with us

    Hi, any kind of comment or suggestion is valuable to us. So feel free to contact with us.

    Email: himadri.shekhar.bd@gmail.com

    Name: WhileNetworking.com

    2021 © WhileNetworking
     

    Loading Comments...