Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] emerge client-only for samba shares?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jssilva
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2017
Posts: 103

PostPosted: Tue Oct 17, 2017 5:09 pm    Post subject: [SOLVED] emerge client-only for samba shares? Reply with quote

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
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19924
Location: here

PostPosted: Tue Oct 17, 2017 5:20 pm    Post subject: Reply with quote

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

...
PDEPEND="${DEPEND}
        acl? ( || (
                =net-fs/samba-3.6*[winbind]
                >=net-fs/samba-4.0.0_alpha1
        ) )
"
...

_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
jssilva
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2017
Posts: 103

PostPosted: Tue Oct 17, 2017 10:51 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
BT
Guru
Guru


Joined: 13 Jun 2004
Posts: 306

PostPosted: Wed Oct 18, 2017 1:14 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 12962

PostPosted: Wed Oct 18, 2017 1:15 am    Post subject: Reply with quote

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?
Back to top
View user's profile Send private message
jssilva
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2017
Posts: 103

PostPosted: Wed Oct 18, 2017 8:40 am    Post subject: Reply with quote

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:
Code:
# mount -t cifs -o username=shareuser,password=***** //192.168.1.100/multimedia /mnt

It fails with:
Code:
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:
Code:
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.
Back to top
View user's profile Send private message
jssilva
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2017
Posts: 103

PostPosted: Fri Oct 20, 2017 5:10 pm    Post subject: Reply with quote

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:
Code:
# 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?
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19924
Location: here

PostPosted: Fri Oct 20, 2017 7:54 pm    Post subject: Reply with quote

Probably you need to install gvfs with samba use flag for thunar.
I think you can disable all samba use flag except client
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
jssilva
Tux's lil' helper
Tux's lil' helper


Joined: 27 Sep 2017
Posts: 103

PostPosted: Fri Oct 20, 2017 10:07 pm    Post subject: Reply with quote

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:
Code:
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.
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 19924
Location: here

PostPosted: Sat Oct 21, 2017 6:08 am    Post subject: Reply with quote

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
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum