On CHOW: Make your next sandwich perfect
BNET Business Network:
BNET
TechRepublic
ZDNet

April 2nd, 2007

Vista Hands On #14: Access shared folders from a Linux machine, part 1

Posted by Ed Bott @ 4:00 am

Categories: Tips, Windows Vista

Tags:

In Focus » See more posts on: Vista, Hands on Vista

Last week, I explained how to create a connection on a computer running Windows Vista to access a shared folder (or directory) on a Linux machine. Today, I show how to connect from a Linux machine to a shared folder on a PC running Windows Vista. These instructions assume that you have already installed Samba server v3.0.22 or later and smbfs on the Linux machine and created a Samba user account containing your credentials. (For details on how to perform these tasks, see Vista Hands On #13: Connect to a shared folder on a Linux machine.) They also assume you’ve set up a password-protected shared folder on the Vista machine and that you’re running in a non-domain environment.

Changes in the architecture of Windows Vista make it more difficult to connect to Vista shares from Linux machines. If you browse the network from Linux (network:///), you can see other machines, including those running any version of Windows. If you double-click the icon for a computer running Windows XP, you can see a list of shared resources on that computer. You can also connect to those resources if you have the correct password. But if you try the same thing with a computer running Windows Vista, you’ll find yourself unable to view the shares, much less connect to them.

Fortunately, there are a couple of workarounds.

For quick access to a shared folder on a machine running Windows Vista, first create an empty folder in your Home directory, using a name that describes the shared files. Next, open a Terminal window and enter the following command, all on one line:

sudo mount -t smbfs -o username=windows_username,password=windows_password
//vista_pc_name/share_name   mount_folder_name

Substitute your Windows username and password for the values in red. Use the UNC path for the Windows share, and replace mount_folder_name with the full path of the folder you created (in my case, I created a folder called shared_vista, so the path I used was /home/edbott/shared_vista). Be sure not to add a space after the comma and before the word password.

[Update: Thanks to Jeremy Allison for pointing out in a comment that smbfs is deprecated and no longer maintained. You can safely substitute cifs for smbfs in the command line above.] 

This technique works fine for quick access to shared files on a Vista machine, but there are two limitations. First, the mounted folder isn’t persistent. If you restart your machine, you’ll have to execute the mount command again to gain access to those shared files. Second, access to the Vista folder is read-only. That’s fine if you just want to copy some files from your Vista machine to the Linux box, but it’s a nuisance if you want to go the other direction.

In that case, there’s a workaround, which you’ll find in the next installment of this series, Vista Hands On #15: Access shared folders from a Linux machine, part 2.

Ed BottEd Bott is an award-winning technology writer with more than two decades' experience writing for mainstream media outlets and online publications. See his full profile and disclosure of his industry affiliations.

Email Ed Bott

Subscribe to Ed Bott's Microsoft Report via Email alerts or RSS.

  • Talkback
  • Most Recent of 51 Talkback(s)
There is another way.
A prejudiced proprietary successful developer facing a bunch of prejudiced open-source users is like a toothless lion facing a group of ... young deer?
Anyway, whenever prejudiced parties make exch... (Read the rest)
Posted by: miyojim Posted on: 04/16/07 You are currently: a Guest | | Terms of Use
Exciting!  xstep | 04/02/07
What's changed...  Ed BottZDNet Moderator | 04/02/07
I take it that you have set up the SAMBA workgroup?  bportlock | 04/02/07
Yes  Ed BottZDNet Moderator | 04/02/07
Use CIFSFS not smbfs  JeremyAllison | 04/02/07
Does it work on Vista?  Ed BottZDNet Moderator | 04/02/07
Works mounting the vista share onto the Ubuntu box.  JeremyAllison | 04/02/07
Thanks Jeremy & Ed...  bportlock | 04/02/07
Many thanks, Jeremy  Ed BottZDNet Moderator | 04/02/07
Glad to help.  JeremyAllison | 04/02/07
mount.cifs is not available in Fedora Core 6  jacarter3 | 04/02/07
Found CIFS in smb4k but not CLI  jacarter3 | 04/02/07
CIFSFS is not a Samba package - it's a kernel package  JeremyAllison | 04/02/07
Kernel Versions  Webmoron99 | 04/02/07
Deep Agreement with xstep  Stan_Krute | 04/02/07
Thanks Ed  shane_f | 04/02/07
Where do I find this  No_Ax_to_Grind | 04/02/07
Depends on the GUI ...  paul.morris@... | 04/02/07
Will that work with a Vista machine?  Ed BottZDNet Moderator | 04/02/07
Seeing as there is no unified GUI  Michael Kelly | 04/02/07
Doesn't work with Gnome or KDE and Vista  Ed BottZDNet Moderator | 04/02/07
You said using "network:///"  Michael Kelly | 04/02/07
I tried smb:// also  Ed BottZDNet Moderator | 04/02/07
In webmin...  bportlock | 04/02/07
Have you tried with Vista?  Ed BottZDNet Moderator | 04/02/07
In a word - no!  bportlock | 04/02/07
In fairness to No_Ax ...  George Mitchell | 04/02/07
In the words or Robert deNiro...  bportlock | 04/02/07
The reason No_Ax is so predjudiced against Linux is ...  George Mitchell | 04/02/07
Hmph. Personally, I've only ever seen his "ruffled feather" posts.  Zogg | 04/03/07
Yes and no...  No_Ax_to_Grind | 04/06/07
There is another way.  miyojim | 04/16/07
RE: Where do I find this  GreyGeek | 04/03/07
I'd be happy if  jbaviera@... | 04/02/07
Have you tried entering UNC name?  Ed BottZDNet Moderator | 04/02/07
Yes!  jbaviera@... | 04/02/07
On your Vista notebook...  CarlS | 04/04/07
Settings!  jbaviera@... | 04/15/07
The problem..  xstep | 04/02/07
No, that's not it  Ed BottZDNet Moderator | 04/02/07
Silly question...  M.R. Kennedy | 04/02/07
No, that's not it either  Ed BottZDNet Moderator | 04/02/07
Did you install smbfs?  MisterMiester | 04/02/07
Yes, smbfs is installed  Ed BottZDNet Moderator | 04/02/07
May have found the answer!!!  MisterMiester | 04/02/07
I already checked that out  Ed BottZDNet Moderator | 04/02/07
Will be fixed in next version of Ubuntu  MisterMiester | 04/02/07
Restart  none none | 04/02/07
For example...  Tony Agudo | 04/02/07
Why not mount it...  bportlock | 04/02/07
That's tomorrow's post  Ed BottZDNet Moderator | 04/02/07

What do you think?

SponsoredWhite Papers, Webcasts, and Downloads

Click Here
advertisement

Recent Entries

advertisement

Archives

ZDNet Blogs

White Papers, Webcasts, and Downloads