You are not logged in.

#1 2009-06-28 17:52:32

oib111
Member
Registered: 2009-06-20
Posts: 87

Mounting a Window's Share

I followed the Wiki's guide for mounting a window's share, but when I try mounting with the smbmount command I get:

bash: smbmount: command not found

I'm not sure what's going on because I did install smbclient.

Offline

#2 2009-06-28 18:14:45

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Mounting a Window's Share

Dunno about smbclient to access shares... why not just mount it as if it were any other partition?  Make a .credentials file that contains your l/p to the windows box like this:

$ su -
# nano ~/.credentials

The file should have two lines containing the username and password you're windows share wants, example:

username=bananaeater
password=fileZsa21

Now make that file restricted to root only to keep it safe:

# chmod 600 ~/.credentials

Now you'll make a mount point for the windows share:

# mkdir /media/share

Finally mount it:

# mount -t cifs -o credentials=/root/.credentials \\windows_machine_name\share /media/share

If you do not have the windows_machine_name linked it an IP address in your /etc/hosts you'll substitute the IP addy of the windows box in that mount statement for the word 'windows_machine_name' as I typed it. 

If you like it, go ahead and add a line to your /etc/fstab to mount the thing automatically or just make a script out of that mount line.

Last edited by graysky (2009-06-28 19:49:47)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2009-06-28 19:01:28

oib111
Member
Registered: 2009-06-20
Posts: 87

Re: Mounting a Window's Share

That didn't work? When I tried the mount command:

# mount -f cifs -o credentials=~/.credentials \\192.168.1.102\music /mnt/shares/isaac

I got the help for the mount command which would mean that the syntax is incorrect?

Offline

#4 2009-06-28 19:44:38

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Mounting a Window's Share

Instead of using ~ in your mount statement, type it out:
/root/.credentials


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2009-06-28 19:45:33

xyrico
Member
Registered: 2009-06-11
Posts: 13

Re: Mounting a Window's Share

I use this same method all the time, but the syntax here is slightly incorrect:

mount -f cifs -o credentials=~/.credentials \\192.168.1.102\music /mnt/shares/isaac

should be:

mount -t cifs -o credentials=~/.credentials //192.168.1.102/music /mnt/shares/isaac

You may also have to run it with sudo or as root.

Last edited by xyrico (2009-06-28 19:49:43)

Offline

#6 2009-06-28 19:50:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Mounting a Window's Share

@xyrico - dammit... that should be -t not -f in my post smile


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#7 2009-06-28 22:09:47

oib111
Member
Registered: 2009-06-20
Posts: 87

Re: Mounting a Window's Share

Thanks guys I'll try those when I get home smile

Offline

#8 2009-07-04 00:23:34

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: Mounting a Window's Share

...any luck?


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#9 2009-07-04 04:54:18

oib111
Member
Registered: 2009-06-20
Posts: 87

Re: Mounting a Window's Share

Ah yes they worked perfectly haha.

Offline

Board footer

Powered by FluxBB