can not mount a samba drive on command line but see via GUI
Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)
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?
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.
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?
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.
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?
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?
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.