LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-04-2017, 02:05 AM   #1
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Rep: Reputation: Disabled
slackware 14.2 | how to mount already configured samba/slackware share point ???


ok trying to add a network share from slackwarebox1 to slackwarebox2 i put this line into etc/fstab (on slackwarebox2)

//192.XXX.X.X/blackhole1 /mnt/Blackhole1 smbfs rw,uid=0,gid=10,fmask=664,dmask=775,username=blahblah,password=blahblah 0 0

It shows up in KDM on the left in places on Nautilus but when i click it it says 'unable to mount"

I tried downloading the SmB4K program too and tried that. but nup, that won't work either.

However i can browse across the network just fine.

Been t it for hours now, quite frustrating, as it seems like a quick fix.

I am guessing it's a users/permissions issue ?

HALP?
 
Old 07-04-2017, 02:32 AM   #2
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 308

Rep: Reputation: 287Reputation: 287Reputation: 287
From "man fstab":

Code:
       The non-superuser mounts.
              Normally,  only  the  superuser  can mount filesystems.  However, when fstab contains the user
              option on a line, anybody can mount the corresponding filesystem.

              Thus, given a line

                     /dev/cdrom  /cd  iso9660  ro,user,noauto,unhide

              any user can mount the iso9660 filesystem found on an inserted CDROM using the command

                     mount /dev/cdrom

              or

                     mount /cd
So you'll want to add "user" as an additional mount-time option to the list in column 4 in your /etc/fstab line. You should then be able to run "mount /mnt/Blackhole1" as user blahblah to view the share.

You can avoid having your Windows password exposed in /etc/fstab like that (where anyone can read it) by putting your Windows credentials in a file readable only by root:

Code:
username=blahblah
password=blahblah
and replacing the "username" and "password" options in your /etc/fstab line with "credentials=/path/to/credentials/file".
 
Old 07-04-2017, 02:50 AM   #3
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Original Poster
Rep: Reputation: Disabled
ok, i think i got the wrong answer.

I already have setup my network using samba on slackwarebox1 so i could access from windows 10 and that is all configured and works perfectly and has for months now.

Now, i have built a new slackwarebox let's call this slackwarebox2, now all i am trying to do is mount the network shares from slackwarebox1 on my slackware2 box.

i have progressed a little since asking the first question in the thread.

root@motherfucker:/# mount -t cifs //192.168.0.3/blackhole1 /mnt/Blackhole1 -o username=nothing
Password for nothing@//192.168.0.3/blackhole1:
Retrying with upper case share name
mount error(6): No such device or address
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

Any password i use will not work :/
so i'm guessing this is a users/permissions thing ?
 
Old 07-04-2017, 02:56 AM   #4
CTM
Member
 
Registered: Apr 2004
Distribution: Slackware
Posts: 308

Rep: Reputation: 287Reputation: 287Reputation: 287
Code:
Retrying with upper case share name
mount error(6): No such device or address
Are you sure the share is available at \\192.168.0.3\blackhole1, and that the (server-side) user "nothing" has permission to access it?
 
Old 07-04-2017, 03:07 AM   #5
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Original Poster
Rep: Reputation: Disabled
honestly, did you read my first post at all ?

I said i can browse the network just fine.
 
Old 07-04-2017, 03:59 AM   #6
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

I guess that's because smbfs is deprecated. Now you need to use cifs instead.

Can you post the output of commands below (run as root) :

Code:
$ mount //192.XXX.X.X/blackhole1 /mnt/Blackhole1 -t smbfs -o rw,uid=0,gid=10,fmask=664,dmask=775,username=blahblah,password=blahblah


$ mount //192.XXX.X.X/blackhole1 /mnt/Blackhole1 -t cifs -o rw,uid=0,gid=10,fmask=664,dmask=775,username=blahblah,password=blahblah
Note that fmask & dmask have been deprecated and you should use file_mode and dir_mode instead.

On my side, running the same kind of commands with one of my share points, I have the following results :

Code:
$ mount -t smbfs -o ro,credentials=/etc/credentials.seb,uid=seb,gid=users //blackdog/sandbox /mnt/hd
mount: unknown filesystem type 'smbfs'

$ mount -t cifs -o ro,credentials=/etc/credentials.seb,uid=seb,gid=users //blackdog/sandbox /mnt/hd

$ mount
...
//blackdog/sandbox on /mnt/hd type cifs (ro)
--
Seb
 
1 members found this post helpful.
Old 07-04-2017, 08:39 AM   #7
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Original Poster
Rep: Reputation: Disabled
thanks heaps btw,

Code:
root@motherfucker:/# mount //192.168.0.3/blackhole1 /mnt/Blackhole1 -t smbfs -o rw,uid=0,gid=10,fmask=664,dmask=775,username=nothing,password=XXXXXX
mount: unknown filesystem type 'smbfs'
root@motherfucker:/# mount //192.168.0.3/blackhole1 /mnt/Blackhole1 -t cifs -o rw,uid=0,gid=10,fmask=664,dmask=775,username=nothing,password=XXXXXXX
WARNING: CIFS mount option 'fmask' is                            deprecated. Use 'file_mode' instead.
WARNING: 'file_mode' not expressed in octal.
WARNING: CIFS mount option 'dmask' is                            deprecated. Use 'dir_mode' instead.
WARNING: 'dir_mode' not expressed in octal.
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
i keep seeing the mention of a credentials file, i'm not sure what this is or if i have one ?

Last edited by jhsdcsjdcvbdj; 07-04-2017 at 08:52 AM.
 
Old 07-04-2017, 10:44 AM   #8
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by jhsdcsjdcvbdj View Post
thanks heaps btw,

Code:
root@motherfucker:/# mount //192.168.0.3/blackhole1 /mnt/Blackhole1 -t smbfs -o rw,uid=0,gid=10,fmask=664,dmask=775,username=nothing,password=XXXXXX
mount: unknown filesystem type 'smbfs'
root@motherfucker:/# mount //192.168.0.3/blackhole1 /mnt/Blackhole1 -t cifs -o rw,uid=0,gid=10,fmask=664,dmask=775,username=nothing,password=XXXXXXX
WARNING: CIFS mount option 'fmask' is                            deprecated. Use 'file_mode' instead.
WARNING: 'file_mode' not expressed in octal.
WARNING: CIFS mount option 'dmask' is                            deprecated. Use 'dir_mode' instead.
WARNING: 'dir_mode' not expressed in octal.
mount error(22): Invalid argument
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
Ok. Now, if you replace fmask and dmask by file_mode and dir_mode, it should work. run the commands below to check this :
Code:
$ mount //192.168.0.3/blackhole1 /mnt/Blackhole1 -t cifs -o rw,uid=0,gid=10,file_mode=0664,dir_mode=0775,username=nothing,password=XXXXXXX

$ mount
Quote:
Originally Posted by jhsdcsjdcvbdj View Post
i keep seeing the mention of a credentials file, i'm not sure what this is or if i have one ?
that's well described in mount.cifs manual :
Quote:
credentials=filename
specifies a file that contains a username and/or password and optionally the name
of the workgroup. The format of the file is:

username=value
password=value
domain=value

This is preferred over having passwords in plaintext in a shared file, such as
/etc/fstab. Be sure to protect any credentials file properly.
--
SeB
 
1 members found this post helpful.
Old 07-04-2017, 07:17 PM   #9
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Original Poster
Rep: Reputation: Disabled
Ok. So, I took photos.

http://i65.tinypic.com/2i1dv75.jpg


http://i65.tinypic.com/1z9mbd.jpg

Hope that makes it easier to understand.
 
Old 07-05-2017, 01:40 AM   #10
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,

Quote:
Originally Posted by jhsdcsjdcvbdj View Post
Ok. So, I took photos.

http://i65.tinypic.com/2i1dv75.jpg


http://i65.tinypic.com/1z9mbd.jpg

Hope that makes it easier to understand.
The mount point /mnt/blackhole1 does not exist. You just need to create it.

Edit:

For security concerns, mount.cifs cannot be used by regular users on Slackware. Therefore, what you want to do needs extra work :

1. set mount.cifs SUID :
Code:
$ su -
$ chmod +s /sbin/mount.cifs

2. add 'user' or 'users' to the option list of your fstab entry, like in example below :
Code:
 //192.XXX.X.X/blackhole1 /mnt/Blackhole1 cifs user,rw,uid=0,gid=10,file_mode=0664,dir_mode=0775,username=blahblah,password=blahblah 0 0
Note that if you use a credentials file to store username/password, this file will have to be readable by any users that should be able to access this share point, which could lead to security concerns.

--
SeB

Last edited by phenixia2003; 07-05-2017 at 02:27 AM.
 
Old 07-05-2017, 06:20 AM   #11
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Original Poster
Rep: Reputation: Disabled
It does exist though, cause i made it, in the mnt folder.
 
Old 07-05-2017, 06:50 AM   #12
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Hello,


Quote:
Originally Posted by jhsdcsjdcvbdj View Post
It does exist though, cause i made it, in the mnt folder.

On the image you sent, the error reported by Dolphin is : An error occured while accessing 'Home', the system responded: mount /mnt/blackhole1: No such file or directory

However, you fstab contains reference to /mnt/Blackhole1 instead of /mnt/blackhole1. So you need to adjust your fstab accordingly.

--
SeB
 
1 members found this post helpful.
Old 07-05-2017, 08:08 PM   #13
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Original Poster
Rep: Reputation: Disabled
no luck.
same deal.
 
Old 07-05-2017, 09:18 PM   #14
jhsdcsjdcvbdj
Member
 
Registered: Feb 2017
Location: Melbourne AU
Distribution: Slackware 14.2
Posts: 83

Original Poster
Rep: Reputation: Disabled
omg i'm so sorry this is so frustrating.

so i can't figure out how to copy and paste the output of vim via the terminal,
so i can't paste my /etc/fstab file.

but now its saying unable to find suitable address.

i can ping that IP address and browse the network share via KDE just fine :/
Whhyyyyy.

root@motherfucker:/home/nothing# mount -t cifs //192.168.0.3/blackhole1 /mnt/Blackhole1
Password for root@//192.168.0.3/blackhole1:
Unable to find suitable address.


???
 
Old 07-06-2017, 01:57 AM   #15
phenixia2003
Senior Member
 
Registered: May 2006
Location: France
Distribution: Slackware
Posts: 1,052

Rep: Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008Reputation: 1008
Quote:
Originally Posted by jhsdcsjdcvbdj View Post
omg i'm so sorry this is so frustrating.
but now its saying unable to find suitable address.

i can ping that IP address and browse the network share via KDE just fine :/
Whhyyyyy.

root@motherfucker:/home/nothing# mount -t cifs //192.168.0.3/blackhole1 /mnt/Blackhole1
Password for root@//192.168.0.3/blackhole1:
Unable to find suitable address.

Can you post :

1. The content of /etc/samba/smb.conf

2. The content of /etc/fstab

3. The output of command :
Code:
$ smbclient -L 192.168.0.3 -U %
3. The output of command :
Code:
$ ls -l /mnt
 
  


Reply



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
[SOLVED] Mount samba share on Slackware: mount error(6) from mount.cifs frushiyama Slackware 11 01-22-2015 07:12 PM
[SOLVED] Root can't chown mount point for samba share? damgar Linux - General 3 06-01-2010 03:03 AM
Unable to add Samba share mount point with Mandriva 2008.1 Clived Mandriva 6 05-19-2008 03:31 PM
slackware cdrom mount point alexphyd Linux - Distributions 1 10-23-2002 06:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:09 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration