LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-29-2013, 12:39 PM   #1
MrTuxor
LQ Newbie
 
Registered: Apr 2013
Posts: 13

Rep: Reputation: Disabled
Samba... Another solution?


I have been messing around trying to get Samba to work for a few days now and I give up. So my question is, what else is there? I want to be able to transfer files from my host OS (Windows 7) to my VMware VM (Fedora 18).

At first I created a user on my Windows 7 box and created a shared folder and shared it out. I used the Activities -> Files -> Network -> Browse Network to access the sahred folder but its access was intermittent so I then tired and failed multiple times with installing/configuring Samba (rebuilt a clearn VM three times trying different ways to get Samba to work).

Is there another way to get files from my Windows PC to my Linux VM? If not, any ideas why Samba won't work?

Here is what I did to try to get Samba working:
- Made sure SELinux was not running by changing 'enforcing' to 'disabled' in /etc/selinux/config
- Installed cups-libx, samba, samba-common, and samba-client via yum with the following command: yum unstall cups-libs samba samba-common samba-client
NOTE: This installed with no errors
- Enabled and started Samba with the following two commands:
- systemctl enable smb.service
- systemctl start smb.service
- Made the directory to share by typing:
- mkdir -p /home/user/Documents/SharedFolder
- Changed ownership of the folder by typing:
- chown -R root:users /home/user/Documents/SharedFolder
- Changed the permissions of the folder by typing:
- chmod ug+rwx,o+rx-w /home/user/Documents/SharedFolder
- Added the following to the bottom of the /etc/samba/smb.conf file:
[sharedfolder]
path = /home/user/Documents/SharedFolder
valid users = @users
force group = users
create mask = 0660
directory mask = 0771
writable = yes
- Made sure the workgroup reflected my Windows's machines Workgroup name in the /etc/samba/smb.conf file
- Restarted Samba by typing:
- systemctl restart smb.service
- Created local user account by typing:
- useradd admin -m -G users
- passwd admin
- Added local user to Samba
- smbpasswd -a admin

I tried to then access the share by typing in the following on my windows machine from the run command:
\\Fedora_VM_IP_Address\admin
I also tried:
\\Fedora_VM_IP_Address\home\user\Documents\SharedFolder
both of which failed.

I am not sure if the connection is failing due to Windows, Linux, or a setting in VMware but it will not connect.

Thanks in advance for the help/info!
 
Old 04-29-2013, 01:41 PM   #2
Sigg3.net
Member
 
Registered: Mar 2008
Location: Oslo, Norway
Distribution: Slackware 14.1 64-bit, Ubuntu 15.10, Fedora 17, Ubuntu 12 LTS and Ubuntu server 10.04
Posts: 173

Rep: Reputation: 28
I'm assuming your virtual machine (guest) is running in the Windows (host) install.

See: http://www.vmware.com/support/ws45/d...refold_ws.html
 
1 members found this post helpful.
Old 04-29-2013, 01:57 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
You named the share sharedfolder, so the correct path to type into the run command would be \\IP.of.the.VM\sharedfolder instead of those you have tried.
 
1 members found this post helpful.
Old 04-30-2013, 06:36 AM   #4
MrTuxor
LQ Newbie
 
Registered: Apr 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Sigg3.net View Post
I'm assuming your virtual machine (guest) is running in the Windows (host) install.

See: http://www.vmware.com/support/ws45/d...refold_ws.html
I was originally going to go this route but VMware Tools failed to install, so I tried the Samba route.
 
Old 04-30-2013, 06:38 AM   #5
MrTuxor
LQ Newbie
 
Registered: Apr 2013
Posts: 13

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TobiSGD View Post
You named the share sharedfolder, so the correct path to type into the run command would be \\IP.of.the.VM\sharedfolder instead of those you have tried.
Thanks for the heads up - at least now I will know which to type in. Samba still isn't working though. I fired up the VM today, started Samba, double checked SELinux was diabled, and that my workgroup/[sharedfolder] information was correct, tried the \\IP.of.the.VM\sharedfolder and it won't connect.

My host IP is 192.168.1.234 and my VM IP is 192.168.131.143. Not sure if that makes a difference or not but I can ping back and forth.
 
Old 05-01-2013, 07:34 AM   #6
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,349

Rep: Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750Reputation: 2750
I guess it really depends if you need to share a disk, or just need to copy files over.
For copying, you could use scp/sftp or plain ftp.

If you really need/want to share a disk over, you need to persist.
Start by (using code tags https://www.linuxquestions.org/quest...do=bbcode#code ) posting your samba cfg.

Have you checked firewalls at both ends; a full Samba cxn needs ports 137, 138, 139, 445 open.
In your case, you may not strictly need all of them, but its simpler if you do.

you may find these useful
http://www.linuxtopia.org/online_boo...ion/index.html Chap 19
http://www.linuxhomenetworking.com/
 
Old 05-05-2013, 09:46 AM   #7
linuxman2013
LQ Newbie
 
Registered: Mar 2013
Location: US of A
Distribution: bt, ubu and rh
Posts: 28

Rep: Reputation: Disabled
a much easier route would be to use an application like freessh that doesn't require cygwin. Samba can turn into a real headache. You can also install VSFTP on the nix box with a jailed acnt so you can write and read to it. FTP is supported by all OSes

Last edited by linuxman2013; 05-05-2013 at 10:46 AM.
 
Old 05-08-2013, 08:44 AM   #8
jitendra.sharma
Member
 
Registered: Mar 2013
Location: ahmedabad
Distribution: CentOS, Ubuntu, Debian
Posts: 92
Blog Entries: 1

Rep: Reputation: Disabled
check the connectivity (try ping the machine #ping destination ip).
check the firewall settings (its allow the samba port or not.).
check your selinux status (it should be enable with proper samba context of selinux).

then try this command: -

@@@ CIFS(windows) share mount in linux @@@

[root@test ~]# mount -t cifs -o username=administrator,password=123 //172.16.0.25/downloads /mnt
 
Old 05-14-2013, 08:15 AM   #9
irreverentryan
Member
 
Registered: Jan 2013
Posts: 32

Rep: Reputation: Disabled
Quote:
Originally Posted by MrTuxor View Post
Thanks for the heads up - at least now I will know which to type in. Samba still isn't working though. I fired up the VM today, started Samba, double checked SELinux was diabled, and that my workgroup/[sharedfolder] information was correct, tried the \\IP.of.the.VM\sharedfolder and it won't connect.

My host IP is 192.168.1.234 and my VM IP is 192.168.131.143. Not sure if that makes a difference or not but I can ping back and forth.

The host and guest are on different subnets, is the virbr working properly? Can you ping the VM IP from the host?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can only map Samba share by IP - not by name: Possible solution Dadoo Linux - Networking 0 08-29-2012 06:52 PM
Planning a single sign in solution - Samba? lucktsm Linux - Networking 2 04-05-2006 06:09 PM
Samba solution needed troycus Linux - Networking 5 04-13-2005 09:08 AM
samba solution tlarolle Linux - Networking 1 10-11-2004 06:22 PM
Suse 9.0 and Samba My solution to a problem. Marc Linux - Networking 0 02-25-2004 01:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration