Hi
I need make shared folder on first CentOS and open it from 2nd CentOS. Both of them is Minimal.
On first:
yum install samba samba-common
chkconfig --level 345 smb on
service smb start
chmod -R 775 /tmp
/etc/samba/smb.conf
[global]
workgroup = SAMBA
security = user
passdb backend = tdbsam
host allow = 192.168.10.2
[tmp]
path = /tmp
browsable = yes
writable = yes
read only = no
guest ok = yes
service smb reload
On second:
yum install samba-client
mount -t cifs //192.168.10.1/tmp /tmp
and get error
mount: wrong fs type, bad option, bad superblock on....
What is going wrong?
mount shared folder on another CentOS
Re: mount shared folder on another CentOS
Did you open your firewall on the server machine to allow the right ports?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke
Re: mount shared folder on another CentOS
firewall is disabled
[root@localhost samba]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
Aug 02 05:51:31 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Aug 02 05:51:31 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Aug 03 09:47:05 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
Aug 03 09:47:06 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@localhost samba]#
[root@localhost samba]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
Aug 02 05:51:31 localhost.localdomain systemd[1]: Starting firewalld - dynamic firewall daemon...
Aug 02 05:51:31 localhost.localdomain systemd[1]: Started firewalld - dynamic firewall daemon.
Aug 03 09:47:05 localhost.localdomain systemd[1]: Stopping firewalld - dynamic firewall daemon...
Aug 03 09:47:06 localhost.localdomain systemd[1]: Stopped firewalld - dynamic firewall daemon.
[root@localhost samba]#
Re: mount shared folder on another CentOS
after
yum install cifs-utils
on second centOS and its work! But asked a password
yum install cifs-utils
on second centOS and its work! But asked a password
Re: mount shared folder on another CentOS
from client CentOS
[root@localhost mnt]# smbclient -L 192.168.10.1
Enter SAMBA\pkpvd's password:
Anonymous login successful
Sharename Type Comment
--------- ---- -------
pkpvd_opt Disk pkpvd Directories
IPC$ IPC IPC Service (Samba 4.7.1)
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful
Server Comment
--------- -------
Workgroup Master
--------- -------
SAMBA LOCALHOST
WORKGROUP ADMIN
but steel can't mount it
[root@localhost mnt]# smbclient -L 192.168.10.1
Enter SAMBA\pkpvd's password:
Anonymous login successful
Sharename Type Comment
--------- ---- -------
pkpvd_opt Disk pkpvd Directories
IPC$ IPC IPC Service (Samba 4.7.1)
Reconnecting with SMB1 for workgroup listing.
Anonymous login successful
Server Comment
--------- -------
Workgroup Master
--------- -------
SAMBA LOCALHOST
WORKGROUP ADMIN
but steel can't mount it
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: mount shared folder on another CentOS
Your SAMBA host is exporting "/tmp" but by default it has the following SELINUX context:
In order to verify that , run
Then just restart your smb and nmb services and try again.
Thus , I'm pretty sure that your SAMBA server cannot provide access to your client.$ ls -lZd /tmp
drwxrwxrwt. root root system_u:object_r:tmp_t:s0 /tmp
In order to verify that , run
Code: Select all
setenforce 0 && getenforce
Re: mount shared folder on another CentOS
SELINUX is turned off
After smbpasswd -a root on first CentOS I can get access to shared folder from second CentOS using
sudo mount -vt cifs //192.168.10.2/pkpvd_opt /opt
How should I configyre /etc/fstab on second CentOS?
//192.168.10.2/pkpvd_opt /opt ext4 defaults 0 0
Is that right?
After smbpasswd -a root on first CentOS I can get access to shared folder from second CentOS using
sudo mount -vt cifs //192.168.10.2/pkpvd_opt /opt
How should I configyre /etc/fstab on second CentOS?
//192.168.10.2/pkpvd_opt /opt ext4 defaults 0 0
Is that right?