# [SOLVED] emerge client-only for samba shares?

## jssilva

Hello,

I think this is a simple question: how can I access samba shares without emerging the full samba server & band?

I've tried to emerge cifs-utils but it wants the full samba truck-load. Looked for a USE flag of the type -server in samba, but it doesn't exist.

On Manjaro-openrc that i was using previously and still resides on another partition, I have cifs, can access shares, but don't have samba installed.

Can somebody help, please?Last edited by jssilva on Fri Oct 20, 2017 10:21 pm; edited 1 time in total

----------

## fedeliallalinea

net-fs/cifs-utils depend on samba only if you enable acl use flag

```

...

PDEPEND="${DEPEND}

        acl? ( || (

                =net-fs/samba-3.6*[winbind]

                >=net-fs/samba-4.0.0_alpha1

        ) )

"

...
```

----------

## jssilva

 *fedeliallalinea wrote:*   

> net-fs/cifs-utils depend on samba only if you enable acl use flag

 

Right, it works, thank you. I learned something else, you should study the ebuilds. I'm getting there...

Please consider that I'm coming from canned binaries.

So, I have cifs-utils and gnome-base/gvfs installed, the kernel has cifs filesystems enabled, but I am still not able to open the share in thunar by going to location smb://user@host. Still getting the red sign right after smb:/

Could you please extend your help? Or someone else, of course. It would be much appreciated.

----------

## BT

net-fs/cifs-utils is only useful when accessing SMB shares via the mount command. GVfs needs libsmbclient for accessing SMB shares, which is provied by net-fs/samba[client]. You need to enable the samba USE flag for gnome-base/gvfs to access SMB shares via Thunar.Last edited by BT on Wed Oct 18, 2017 1:15 am; edited 1 time in total

----------

## Hu

What does the red sign mean?  What error is logged when this fails?  Are you able to use the kernel's CIFS support to mount the share as a network filesystem?

----------

## jssilva

Thank you for helping.

 *Hu wrote:*   

> Are you able to use the kernel's CIFS support to mount the share as a network filesystem?

 

This works on manjaro-openrc but not on gentoo:

```
# mount -t cifs -o username=shareuser,password=***** //192.168.1.100/multimedia /mnt
```

It fails with:

```
mount error(5): Input/output error

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)
```

 *Hu wrote:*   

> What does the red sign mean?

 

Just a real-time way of Thunar telling you that it's not going to work.

Before you ask, the relevant config part of my kernel is:

```
CONFIG_CIFS=y

CONFIG_CIFS_STATS=y

CONFIG_CIFS_STATS2=y

# CONFIG_CIFS_WEAK_PW_HASH is not set

# CONFIG_CIFS_UPCALL is not set

CONFIG_CIFS_XATTR=y

CONFIG_CIFS_POSIX=y

# CONFIG_CIFS_ACL is not set

CONFIG_CIFS_DEBUG=y

# CONFIG_CIFS_DEBUG2 is not set

# CONFIG_CIFS_DEBUG_DUMP_KEYS is not set

# CONFIG_CIFS_DFS_UPCALL is not set

CONFIG_CIFS_SMB311=y

```

Thank you again for your time.

----------

## jssilva

One more development: I discovered that if I explicit the version, any version (1.0, 2.0, 2.1, 3.0), the share is mounted:

```
# mount -t cifs -o username=shareuser,password=*****,vers=2.0 //192.168.1.100/multimedia /mnt
```

Strange, isn't it? Doesn't it have a default? Sounds like a bug to me.

Now I can access samba shares but this does not solve the whole problem:

1. Thunar still does not accept open smb://user@server/sharename on the toolbar (red-sign)

2. Clicking on the side-bar Network icon does nothing; no servers shown on the main window (and I know they exist).

So, sorry to insist, can anybody help, please?

----------

## fedeliallalinea

Probably you need to install gvfs with samba use flag for thunar.

I think you can disable all samba use flag except client

----------

## jssilva

Thank you for helping. Everything is working now.

Your advice of enabling only the client flag was determinant on my decision to go ahead and emerge the whole load dragged by samba, which was somehow reduced by masking everything else.

Don't misunderstand me, I don't have a problem with disk space or processing time. My concern is introducing security holes in my system by enabling samba server components in it. I hope this is not true by disabling everything but the client components.

So, I set the flags:

```
gnome-base/gvfs samba fuse

net-fs/samba client -acl -cups -fam -ldap -pam -system-mitkrb5

```

and emerged gnome-base/gvfs (no gnome), but also had to emerge net-fs/smbnetfs.

Reboot and everything works, including network browse.

With the precious help of this board, my system migration is now complete and I'm sticking to Gentoo which I believe, due to its policy, is intrinsically more secure and gives more guarantees of long-term stability and independence.

Thank you all, see you soon.

----------

## fedeliallalinea

 *jssilva wrote:*   

> Don't misunderstand me, I don't have a problem with disk space or processing time. My concern is introducing security holes in my system by enabling samba server components in it. I hope this is not true by disabling everything but the client components.

 

Also if you add server component of samba but without enable service the security problem is low

----------

