LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-08-2008, 07:17 AM   #1
pirhana
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: CentOS
Posts: 20

Rep: Reputation: 0
access shared windows folders via CLI / script


I have one machine running CentOS5 and 2 windows machines. I know windows very well, but I'm still very much a linux newb.

I have shared a folder on each windows machine and can access this via the file manager in konqueror at smb://192.168.2.20

I now need access to this folder (and its files) via the CLI as I wish to use this in a shell script.

How can this be done? I can't find any detail on this anywhere. Today, Google is not my friend LOL

Any help appreciated.
 
Old 01-09-2008, 01:27 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,837

Rep: Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987
When the share is mounted, there should be a folder created to access it under /media, or possibly /mnt.

If you want the share to mount permanently to a specific location, you can set up an entry in your /etc/fstab file to tell it where to mount. You should be able to easily find details about how to do it with a simple search (either here or Google).
 
Old 01-10-2008, 02:38 PM   #3
pirhana
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
Thanks, I now see that I need to mount the shared folder. Trouble is I cant seem to do this.

I have created a folder called LOCAL-2-24 in /mnt/ and then tried the following (and many other variants). I'm using CentOS5 if it helps and can see the folders at smb://192.168.2.24/Docs in the GUI
The Windows XP machine at 192.168.2.24 is called LOCAL-2-24

Quote:
[root@local ~]# mount -v -t ntfs //LOCAL-2-24/Docs /mnt/LOCAL-2-24
mount: special device //LOCAL-2-24/Docs does not exist
[root@local ~]#
Quote:
[root@local ~]# mount -v -t ntfs 192.168.2.24:/Docs /mnt/LOCAL-2-24
mount: special device 192.168.2.24:/Docs does not exist
[root@local ~]#
Can anyone point me in the right direction?
 
Old 01-10-2008, 03:04 PM   #4
pirhana
LQ Newbie
 
Registered: Nov 2007
Location: UK
Distribution: CentOS
Posts: 20

Original Poster
Rep: Reputation: 0
As soon as I post for help I figure it

http://www.linuxforums.org/forum/red...-mounting.html
explained how to use cifs as the file format.

Anyways, how do I unmount? I read somewhere the command was unmount but I get
Quote:
-bash: unmount: command not found
 
Old 01-11-2008, 06:27 AM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian + kde 4 / 5
Posts: 6,837

Rep: Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987Reputation: 1987
It's not 'unmount', it's 'umount'. There's no 'n'. I know it can be a pain for newbies to figure that out. If you want, you can set up an alias so that either one will work. I'll leave how to do that as an exercise for you to research yourself.
 
  


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
Samba shows shared folders in Windows but a Guest login pops up when trying to access ciphe Linux - Software 4 08-20-2007 11:55 AM
Access shared folders outside local LAN netphreak Linux - Networking 3 01-17-2007 11:37 PM
Easy way to access Windows shared folders ? robertpolson Linux - Networking 7 01-16-2007 02:51 PM
cant get linux to go into windows shared folders kamowa Linux - Networking 4 09-22-2005 12:02 PM
is it possible to access windows xp home shared folders? kahn Linux - Networking 5 07-03-2005 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:17 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration