LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 10-07-2007, 12:48 PM   #1
cricballa
Member
 
Registered: Jan 2007
Posts: 33

Rep: Reputation: 15
can not mount a samba drive on command line but see via GUI


I am using Fedora 7 and am trying to mount my windows share drive on linux.
I have the following related questions:

1.
If I uese the following command:

mount -t smbfs //MyPC/SharedDocs /mnt/WinShare

I get the response, mount: unknown filesystem type 'smbfs'

However, if I use my graphics interface (gnome) by Places->network, I can see my window's files. This means that my samba service is running fine. what is going on?

2
If I use findsmb, I get the following message:
*=DMB
+=LMB
IP ADDR NETBIOS NAME WORKGROUP/OS/VERSION
---------------------------------------------------------------------
192.168.1.103 BRN_7417F4 Unknown Workgroup

This is the address of my brother printer. My linux machine does not see my other windows m/c but still through GUI I can see my shared drive. why?

3.
Since I can see my shared drive using graphical interface, I expect that somewhere, my shared drive is mounted. But if I use mount command, I get the following, which does not indicate any shared drive mounted.
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
/dev/sda7 on /boot type ext3 (rw)
tmpfs on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw)

What is going on her?

Cric
 
Old 10-07-2007, 02:51 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Use the "cifs" filetype. smbfs is depreciated.
 
Old 10-07-2007, 05:24 PM   #3
cricballa
Member
 
Registered: Jan 2007
Posts: 33

Original Poster
Rep: Reputation: 15
Thumbs down

Thank. Now I get the following error message (if I use cifs instead of smbfs):

mount error: could not find target server. TCP name MyPc/SharedDocs not found No ip address specified and hostname not found. I checked that the computer name of my windows m/c is MyPc and I am trying to share the right directory. Do I need to do some settings on windows m/c as well. But, then why I am able to see my share through GUI?
 
Old 10-07-2007, 07:34 PM   #4
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
My command structure is like this:
Quote:
mount -t cifs //xxx.xxx.xxx.xxx/c$ /mnt/WinShare -o username=[winusername] -o password=[winpassword]
[winusername] is the username you authenticate to on Windows.
[winpassword] is the password you authenticate on Windows.

I have trouble using the the Windows UNC name to connect to it, and find it much easier to use the IP instead. In other words, try //xxx.xxx.xxx.xxx/SharedDocs, instead of //MyPC/SharedDocs.
 
Old 10-07-2007, 08:28 PM   #5
cricballa
Member
 
Registered: Jan 2007
Posts: 33

Original Poster
Rep: Reputation: 15
Indeed if I use ip address it works. However, I would like to use the host name and since gnome is seeing the host name, then it should work on command line as well.

It is also a mystery for me that why findsmb command does not show all the computers on the network?

cric
 
Old 10-08-2007, 03:11 PM   #6
SlowCoder
Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Fedora (Desktop), CentOS (Server), Knoppix (Diags)
Posts: 934

Rep: Reputation: 38
Quote:
Originally Posted by cricballa View Post
Indeed if I use ip address it works. However, I would like to use the host name and since gnome is seeing the host name, then it should work on command line as well.

It is also a mystery for me that why findsmb command does not show all the computers on the network?

cric
You might want to consider a WINS server/client configuration for that. I don't know what Linux has available, but I think it could be a start for you.
 
Old 10-09-2007, 12:07 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
You might try adding "winbind" to the "hosts:" line in /etc/nsswitch. If you have samba installed you should have the libnss_winbind installed as well. If you enable wins, then and "wins" to the hosts: line instead and make sure that libnss_wins is installed.

If you don't have too many hosts, you the easiest solution is to add the host to your hosts file. You haven't indicated anything about your network, so I assumed it is a small home network and that you aren't running a domain or using ldap.

Also double check hat you have the windows networking ports open in your firewall. Can you enter "smb://<hostname>" in konqueror?
 
Old 10-13-2007, 07:29 PM   #8
cricballa
Member
 
Registered: Jan 2007
Posts: 33

Original Poster
Rep: Reputation: 15
1. On my firefox, if I use smb://myPc/SharedDocs, I can see the drive.
2. I do not find nsswitch in /etc or in any other directory. Could I have a sample?
3. Since I can see the shared drive via gui, I expect that it is mounted. But mount or df -k does not show this drive as mounted. Is there any explanation?
 
Old 10-14-2007, 06:38 AM   #9
larkl
Member
 
Registered: Sep 2007
Distribution: Puppy 5.2.8
Posts: 69

Rep: Reputation: 15
I've had this same problem (can browse SMB shares with IP, but can't with NetBIOS name) due to a software firewall blocking the NetBIOS browsing. I'd see if you have a firewall running.
 
Old 10-20-2007, 08:40 PM   #10
cricballa
Member
 
Registered: Jan 2007
Posts: 33

Original Poster
Rep: Reputation: 15
Thanks jschiwal, you really are guru. It was just adding wins in host: line to make mount work for network drive with the hostname.

Just for my curiosity, without this line, how GUI manages to resolve hostname?
Cric
 
  


Reply

Tags
samba, shareddirectory


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
command line and GUI kpachopoulos Linux - Newbie 3 08-22-2004 09:13 AM
mount of samba share hangs on command line Gates1026 Linux - Software 2 11-19-2003 08:57 AM
Command line to GUI Jon84 Slackware 34 03-12-2003 08:54 PM
Need help getting to GUI from command line Negativ13 Linux - Newbie 6 02-25-2003 03:20 PM
Command Line vs GUI Poorman Linux - General 27 07-11-2002 12:40 PM


All times are GMT -5. The time now is 10:04 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration