Re: Sharing files between host and guest under KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2016-02-08 at 17:43 +0000, Patrick O'Callaghan wrote:
> On Mon, 2016-02-08 at 12:35 +0900, Earl A Ramirez wrote:
> > > Clearly this could be done using Samba or NFS. Is there an easier
> > > way?
> > 
> > Personally I have been using Samba, haven't seen an easier way.
> 
> Yes, that seems to be the way to go. I'm almost there (having figured
> out that I needed to open a hole in the host firewall), just having a
> problem getting the guest to authenticate. I don't understand CIFS
> passwords :-(
> 
> poc

First you will need a local account on for this I usually create a user
without any shell access
$ sudo useradd -s /sbin/nologin smbuser

Then you will have to create the samba user
$ sudo smbpasswd -a smbuser

start both samba services: 
$ sudo systemctl start smb; sudo systemctl start nmb

Open up the firewall ports
$ sudo firewall-cmd --permanent --add-service=samba
$ sudo firewall-cmd --reload

A very basic mount of the samba share
$ sudo mount -t cifs -o username=smbuser,password=yoursmbpassword
//192.168.124.1/smbshare /mnt/smbshare

You can also use auto mount to achieve this or fstab; you can also use
a credential file and only give root read only access.

if you are sharing your home directory don't forget to enable the
SELinux boolean 
$ sudo setsebool -P samba_enable_home_dirs 1

Let me know if this helps
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
Have a question? Ask away: http://ask.fedoraproject.org



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux