LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Unable to set up Samba client (https://www.linuxquestions.org/questions/slackware-14/unable-to-set-up-samba-client-4175735376/)

arubin 03-27-2024 11:23 AM

Unable to set up Samba client
 
I am trying to set up Samba using the instructions at https://wiki.alienbase.nl/doku.php?id=slackware:samba

I think that I have the server set up ok but I am having difficulty with the client side

The mount command
Quote:

mount -t cifs //192.168.0.1/public /mnt/samba/bob/public -o rw,uid=0,gid=10,fmask=664,dmask=775 -U <some_special_user>
fails with
Quote:

mount: bad usage
I have tried simplifying things to
Quote:

mount -v -t cifs //192.168.1.51/smbguest /mnt/samba/alan
or
mount -v -t cifs //192.168.1.51/alan /mnt/samba/alan
but these give me
Quote:

mount error(13): Permission denied
What am i doing wrong?

chemfire 03-27-2024 11:58 AM

are you calling mount as root?

Normally only root can mount file systems unless you declare them in fstab or do it via some daemon like udisks. However seeing basic mount command when run as root work before trying to solve other problems is likely the best place to begin.

arubin 03-27-2024 12:05 PM

Yes. Calling it as root

henca 03-27-2024 12:33 PM

Maybe you can find some clues in the logs from samba on the samba server. Depending on your smb.conf you might need to specify some user or domain to connect as when you mount.

However, Samba is kind of a server intended for crappy Windows clients. A posix OS like Linux usually prefer a network file system which understands posix features like chmod, users, groups and symbolic links. NFS might be a better choice to share files between Slackware systems.

regards Henrik

ctrlaltca 03-27-2024 12:42 PM

I'd try mount.cifs
Code:

mount.cifs //192.168.0.1/public /mnt/samba/bob/public -o rw,uid=0,gid=10,username=<some_special_user>
The -U option of mount is used to specify a partition by uuid, not the username

arubin 03-27-2024 01:12 PM

Quote:

Originally Posted by ctrlaltca (Post 6492322)
I'd try mount.cifs
Code:

mount.cifs //192.168.0.1/public /mnt/samba/bob/public -o rw,uid=0,gid=10,username=<some_special_user>
The -U option of mount is used to specify a partition by uuid, not the username

Thanks. That works!

arubin 03-27-2024 01:24 PM

Another problem though.
I run a firewall on my desktop generated at http://www.slackware.com/~alien/efg/index.php
This blocks samba. How to I get my laptop to connect to my desktop through the firewall? I don't seen an option on the Easy Firewall Generator to allow samba.

chud1950 03-27-2024 08:03 PM

Samba (smb) uses tcp port 445. You may need to configure your firewall to allow traffic that uses that port.
I looked at your link: http://www.slackware.com/~alien/efg/index.php
and it looks like there is an option to allow inbound services. Try enabling that option and regenerate your firewall.

chud1950 03-27-2024 08:16 PM

You might also need to allow port 139.
https://wiki.samba.org/index.php/Sam...ber_Port_Usage

arubin 03-29-2024 05:37 AM

The link at http://www.slackware.com/~alien/efg/index.php has an option to allow inbound services which then gives a list of options but samba is not one of them.

I found that this worked
Quote:

$IPT -A INPUT -s 0/0 -p TCP --dport 139 -j ACCEPT
$IPT -A INPUT -s 0/0 -p TCP --dport 445 -j ACCEPT
$IPT -A INPUT -s 0/0 -p TCP --dport 139 -j ACCEPT
$IPT -A INPUT -s 0/0 -p TCP --dport 445 -j ACCEPT


All times are GMT -5. The time now is 02:55 AM.