[SOLVED] slackware 14.2 | how to mount already configured samba/slackware share point ???
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
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".
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 ?
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)
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.
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
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.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.