Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to figure out how to share a network windows CIFS share ( I do not manage it ) with smbclient.

Initially I tried using the default Debian Lenny mounting application in Places->Connect to Server->Custom Location and I typed

smb://DOMAIN;meder@subdomain.maindomain.com/groups

(note: there's also a password to go along with my login)

So someone recommend to use smbclient except I did try various combinations based on interpreting my initial smb command but am not able to get the right syntax.

Someone mind helping? And also - what would I need to enter into /etc/fstab to perma mount?

Here's a screenshot on someone's Ubuntu of the exact error I receive while trying to copy it from the custom location mount:

enter image description here

Update

Thanks to caliban, I was able to actually connect with 'smbclient'. My currently dilemma is just having a permanent mount for that, here is my attempt at editing /etc/fstab:

Below my /dev/scd0 entry for my CD ROM Drive:

//subdomain.maindomain.com/share /mnt/share smbfs username=DOMAIN/meder,password=mypass,umask=0002 0 0

I actually had created /mnt/share as root with mkdir, was I supposed to do that?

And are there any log files I can view which would report it failing to mount that?

I restarted 3 times fully and I see empty files in /mnt/share, no error messages or anything.

Solution:

I actually modified the 'smbfs' in my /etc/fstab to be 'cifs' and it started working. I guess this means I'm not using smbfs/smb. It complained when I had it to 'smbfs' in /var/log/messages and said to read man mount.cifs.

share|improve this question
    
er... wait. just saw the error, so you mean you can actually connect to the share?? –  caliban Sep 15 '09 at 10:56
    
I didn't have smbclient or smbfs when that happened, it was using some sort of default network connector application to try to connect to the smb. Then it was giving that, and someone said try smbclient. –  meder Sep 15 '09 at 11:15
add comment

1 Answer

up vote 2 down vote accepted

It should be smb://domain;username:password@servername/foldername

domain username password servername foldername

This is the proper syntax if everything works. So, if I want to connect to my fantasy share, it will be :

smb://acmedefenses.com;caliban:12345678@battleplansserver/worlddomination

Not that this share exists, of course. :)

EDIT : updated answer with a short primer on how to use smbclient to test connectivity

To use smbclient to test connectivity, you can issue this command

smbclient //servername/foldername -U domain/username

smbclient //battleplansserver/worlddomination -U acmedefenses.com/caliban

To mount a SAMBA share in fstab, try this

//*servername*/*foldername* /mnt/samba smbfs username=*domain*/*username*,password=*password* 0 0

//battleplansserver/worlddomination /mnt/worlddom smbfs username=*acmedefenses.com/caliban,password=12345678 0 0
share|improve this answer
    
Sorry - am I supposed to use that or smbclient? Or would that already use smbclient? foreheadslap - I'm not on the actual network so I can't try it now. –  meder Sep 15 '09 at 10:43
    
smbclient is primarily used to test for connectivity - it's far more verbose than a simple Nautilus file explorer for example. :) Edited my answer to reflect. –  caliban Sep 15 '09 at 10:50
    
Awesome; just tried smbclient and it worked. However I wasn't able to get the fstab / mounting part to work. I'll edit with my attempt. –  meder Sep 17 '09 at 0:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.