Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mounting Samba Partitions
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 12:09 am    Post subject: Mounting Samba Partitions Reply with quote

I've just gotten my Gentoo computer up and running perfectly (well, windows got killed in the process, but that could be considered a good omen...), except for being able to mount samba shares. a while back i got an old computer, and put debian on it. my dad then gave me a 120 gig hard drive, and said "turn it into a server". so, i did, and got samba running perfectly. now, the only time i reboot that computer is when the power goes out, and i barely touch it. because i have a 100 MB/sec ethernet LAN in my house, i decided to put my MP3s on the debian computer, and i think i'm going to move my school work there too. the reason? as far as i know, i can't read fat32 partitions with linux (i know i can somehow, but i haven't found anything yet, and i haven't tried looking, yet). seeing as i already have half a samba network set up, i figured i might as well finish it.

i went to www.samba.org, and looked around, trying to find out how to mount a samba partition. i figured it out, but then realized you need the "smbfs" package to use the "smbmount/smbumount" commands. i ran an "emerge smbfs", and of course, found nothing. now, here's my problem. i'm trying to get to my samba server, and hopefully be able to put something in fstab, so that i can auto mount when i boot (the gentoo computer is noisy, so i usually shut it off at night unless i'm compiling stuff). in any case, i need to find out some way to get the smbfs package installed on my computer, so i can fix my problem. take in mind, i just installed gentoo, so i don't know much, but i'm good at copying and pasting commands (or links to other places that might help me) ;).
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Sun Nov 03, 2002 12:38 am    Post subject: Reply with quote

emerge samba

Make sure samba is compiled into your kernel, it's under network file systems.
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 1:14 am    Post subject: Reply with quote

yeah, i got that far. i actually figured out how to mount it, but it's not wanting to work.

Code:
# smbmount "\\\\Catbert\\Arch - Gen" /arch/gen username=Ian
Password:
4813: session setup failed: ERRSRV - ERRbadpw (Bad password - name/password pair in a Tree Connect or Session Setup are invalid.)
SMB connection failed


i try that with and without a username, and i get that same error every time. i know for a fact that the username/password are correct, but i don't know why i'm being told they aren't.

Anyone have any experience with making samba work?

<edit>
and yes, i know that my computer is named "Catbert", but it's something my dad started, so i'm sticking with it :p.


Last edited by Ian on Sun Nov 03, 2002 1:15 am; edited 1 time in total
Back to top
View user's profile Send private message
metalhedd
l33t
l33t


Joined: 30 May 2002
Posts: 692
Location: Ontario Canada

PostPosted: Sun Nov 03, 2002 1:15 am    Post subject: Reply with quote

if smbfs is in the kernel you don't even need to emerge samba, you can just mount -t smbfs //debianbox/share /mnt/foo

As for fat32. linux supports read and write fully.. just mount the fat partition and everything will just work. vfat support has to be in the kernel.

you should probably specify fat in the mount options just to be safe.
'mount -t vfat /dev/hda3 /mnt/winblows'
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 2:27 am    Post subject: Reply with quote

when i try 'mount -t smbfs //debianbox/share /mnt/foo' i get a little thing on mount...

Code:
# mount -t smbfs //Catbert/Arch - Gen /arch/gen
Usage: mount -V                 : print version
       mount -h                 : print this help
       mount                    : list mounted filesystems
       mount -l                 : idem, including volume labels
So far the informational part. Next the mounting.
The command is `mount [-t fstype] something somewhere'.
Details found in /etc/fstab may be omitted.
       mount -a                 : mount all stuff from /etc/fstab
       mount device             : mount device at the known place
       mount directory          : mount known device here
       mount -t type dev dir    : ordinary mount command
Note that one does not really mount a device, one mounts
a filesystem (of the given type) found on the device.
One can also mount an already visible directory tree elsewhere:
       mount --bind olddir newdir
or move a subtree:
       mount --move olddir newdir
A device can be given by name, say /dev/hda1 or /dev/cdrom,
or by label, using  -L label  or by uuid, using  -U uuid .
Other options: [-nfFrsvw] [-o options] [-p num].
For many more details, say  man 8 mount .


as far as i can tell, it just tells me how to use the mount command, but it's not actually mounting it. at least now i understand how it works, but it's still not working :p.
Back to top
View user's profile Send private message
metalhedd
l33t
l33t


Joined: 30 May 2002
Posts: 692
Location: Ontario Canada

PostPosted: Sun Nov 03, 2002 2:36 am    Post subject: Reply with quote

in that case either you dont have smbfs support in your kernel or i told you the wrong commandline. it might be sambafs or something, I dunno, I'm at a stupid NT4 Machine. blarg
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 2:46 am    Post subject: Reply with quote

lol, i have 'SMB File System Support' compiled in the kernel. is that all i need? also, there are a few different commands i've seen so far (from something like yours to something like mount.smbfs i think), so i'm starting to get more and more confused :p. i'll try some more stuff out, see if i can find it.
Back to top
View user's profile Send private message
metalhedd
l33t
l33t


Joined: 30 May 2002
Posts: 692
Location: Ontario Canada

PostPosted: Sun Nov 03, 2002 2:53 am    Post subject: Reply with quote

never seen mount.smbfs but theres smbmount if you emerge samba.
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Sun Nov 03, 2002 3:02 am    Post subject: Reply with quote

"never seen mount.smbfs but theres smbmount if you emerge samba."

This is why I told him to emerge samba.

smbmount -o username=xxx,password=xxx //server/share /mnt/wherever
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 3:14 am    Post subject: Reply with quote

uh splooge, your way gave me something similar to what i've been getting. it also says that it's the same as mount.smbfs (that's probably where i saw it before). so yeah, unless i just typed something in wrong (which could be the case) the smbmount thing doesn't work either :/.
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Sun Nov 03, 2002 3:17 am    Post subject: Reply with quote

Hrm, try adding this to /etc/fstab:

//10.1.1.200/c /mnt/c smbfs noatime,noauto 0 0

Make sure your mount point /mnt/c exists:

mkdir /mnt/c

then:

mount /mnt/c

See if that helps.
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 3:24 am    Post subject: Reply with quote

nope, fstab doesn't like smbfs mounting in it. just tells me the line it's on is bad. this is starting to annoy me, because it should be so simple, yet it's not...

*pulls out his hair*

oh well, at least i'm getting somewhere with it (even though it is much yet).
Back to top
View user's profile Send private message
splooge
l33t
l33t


Joined: 30 Aug 2002
Posts: 636

PostPosted: Sun Nov 03, 2002 3:41 am    Post subject: Reply with quote

For ease's sake ... take out the spaces in the sharename, and try again, making sure there's only the spaces that are appropriate in your fstab.
Back to top
View user's profile Send private message
haidar
n00b
n00b


Joined: 10 Sep 2002
Posts: 3

PostPosted: Sun Nov 03, 2002 3:45 am    Post subject: Reply with quote

Hello,

I am not sure if you did this or not, I always have to add a username in the samba password file like this:

smbpasswd username

it will prompt you for a password. you need to use the same username and password as in the windows machine.

also did you make sure that the option :
encrypt passwords = true
is in your smb.conf file

I hope this helps.

Ayman
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 4:19 am    Post subject: Reply with quote

yeah, i've had the server side set up for a while now. that part i know works, and i have no problem going windows --> linux (i haven't tried linux --> windows, because i never had to yet). the problem i'm having is the client side on linux, because this is the first time i've gone linux (client) --> linux (server), mostly because i've never had a second linux computer till now :p.

Also, the way i set up the share names, they have spaces and such in them, so they looked pretty on my windows computers (yeah, a stupid reason, but it meant hitting the space bar twice, so i didn't really care).
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 4:25 am    Post subject: Reply with quote

splooge wrote:
For ease's sake ... take out the spaces in the sharename, and try again, making sure there's only the spaces that are appropriate in your fstab.


i just tried this, and it works, partially. it sees the share, and tries to connect, but it seems to refuse the password :/. i have a few more things i can try, but i'm not sure if it will work.
Back to top
View user's profile Send private message
securiteaze
Tux's lil' helper
Tux's lil' helper


Joined: 24 Oct 2002
Posts: 77
Location: Tulsa,Oklahoma

PostPosted: Sun Nov 03, 2002 4:43 am    Post subject: Reply with quote

Try this
Code:
mount -t smbfs -o username=Ian,password=pass //Catbert/Arch\ -\ Gen /mnt/catbert


I also agree that spaces in shares are not wonderful, but if you like 'em, so be it.
_________________
Blah..
Back to top
View user's profile Send private message
Ian
l33t
l33t


Joined: 28 Oct 2002
Posts: 834
Location: Somerville, MA

PostPosted: Sun Nov 03, 2002 4:48 am    Post subject: Reply with quote

thank you * a bajillion :D

that way works, why i don't know, but just that it does, after i remembered to put my password in place of pass, that is... :p. i tried to remove the spaces, but since i'm lazy and use SWAT, i wasn't able to easily. of course, it takes me a whole 3 seconds to take them out, but i guess if this way works, it's better. once again, thanks a bunch, because i think this means that my base system is finally complete :).
Back to top
View user's profile Send private message
Liebniz
n00b
n00b


Joined: 02 Nov 2002
Posts: 3

PostPosted: Sat Nov 09, 2002 3:32 am    Post subject: smbfs kernel support, no merged samba Reply with quote

metalhedd, are you sure about that smbfs kernel support being all you require for the system to act as a smb client?

i've spent a few hours searching threads, docs, samba site, how-to's (and on and on) with no success of finding any information about that issue.

my situation: i have only a 2gb drive on my laptop and all i need is the smb client piece. i would prefer not to emerge samba, as the package is so large. however, it looks like i have to do that in order to mount any foreign partitions.

i have smbfs support in the kernel. i tried it statically and as a module. in all instances, a 'lsmod' showed it was in fact loaded. however, a 'mount -t smbfs //foreign/share /mnt/mntpoint -o username=fred' returns only the now familiar 'smbfs not supported in the kernel'.

actully i do have samba emerged and it works fine, but i would like to unmerge it for the space value if i can...

...or did you just copy the smbmount binary from another system to make that work?
_________________
Thanks,
Bill
Back to top
View user's profile Send private message
metalhedd
l33t
l33t


Joined: 30 May 2002
Posts: 692
Location: Ontario Canada

PostPosted: Sat Nov 09, 2002 3:52 pm    Post subject: Reply with quote

well I emerge samba in its entirety (sp?) because I had full intentions of using the server as well.. but I remember seeing somewhere that you don't need the server installed or running, you just need to mount the shares as smbfs. if you're saying that right now you have samba installed completely and you still can't mount the shares then the problem must be somewhere else. did you try the smbmount or smbclient commands>?
Back to top
View user's profile Send private message
Liebniz
n00b
n00b


Joined: 02 Nov 2002
Posts: 3

PostPosted: Sat Nov 09, 2002 7:46 pm    Post subject: Reply with quote

that's the thing. when you emerge samba, it works fine (well, it may be an issue samba mounting a foreign partition onto a local reiserfs filesystem, but that's another issue)

i was also under the impression that there was enough smb kernel support to effectively work as a smb client without emerging samba. perhaps i read too much into that functionality. kernel support doesn't imply 'client'. it must have been wishful thinking on my part.

anyway, the whole goal of gentoo (imho) is to have only exactly what you need, and no more. and what you have, you have optimized. that's obviously important when you only have a p166mmx laptop with a 2gb drive.

i ended up just emerging samba. i may have extra utils on my machine that i won't use but at least i can now have /usr/portage and /var/tmp/portage as mounted partitions.

:?
_________________
Thanks,
Bill
Back to top
View user's profile Send private message
Oo.et.oO
Apprentice
Apprentice


Joined: 23 Apr 2002
Posts: 291
Location: burlington

PostPosted: Tue Nov 12, 2002 8:17 pm    Post subject: spaces in /etc/fstab Reply with quote

from man fstab:
Quote:
If the name of the mount point contains spaces these can be escaped as `\040'.

this, of course, works for the device as well (in this case the smb share)

here is my fstab:
Code:

# <fs>             <mountpoint>    <type>     <opts>    <dump/pass>
/dev/hda1      /boot   ext3   noauto,noatime   1 1
/dev/hda2      /   ext3   noatime    0 0
/dev/hda3      none      swap      sw 0 0
proc         /proc      proc      defaults 0 0
/dev/cdroms/cdrom0      /mnt/cdrom      auto           user,noauto,ro 0 0
/dev/fd0      /mnt/floppy   auto      user,noauto 0 0
//lex/my\040shared\040fo   /mnt/lex/mp3   smbfs      user,noauto 0 0
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum