Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Samba on Gentoo
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
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 266
Location: Brisbane, Australia

PostPosted: Mon Dec 23, 2013 2:25 am    Post subject: [SOLVED] Samba on Gentoo Reply with quote

I am new to Gentoo.

My home network consists of 4 OpenSuse 12.2 PC's with Gnome Desktops running Samba and 2 Win7 in VirtualBox. The users can share and unshare directories such as ~/Downloads, ~/Videos, ~/Documents/spreadsheets, etc. with right clicking in Nautilus, Thunar or Windows Explorer on the relevant directory and grand or withdraw the share (read/write) permission for the other users on the LAN. The users can, without password as "guest" connect to, list, download and upload files from and to other user's shared directories by clicking on "Browse Network" and selecting the desired PC and Share from the list.

I wish to replace OpenSuse with Gentoo (Xfce Desktop) because of Bloat and the requirement to re-install and configure every year or so a new version of the OS and all applications on all on all 4 PC's.

I installed for testing Gentoo with Xfce Desktop on a virtual machine. All works fine and can be configured as users want and need, except SAMBA, following the various HowToo's and postings.

I kindly ask for:
1.) The list of the items to emerge.

2.) The applicable smb.config and other configuration files.
This is the smb.conf file from my OpenSuse PC's:
Code:

/etc/samba/smb.conf
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2012-08-08

[global]
   workgroup = WORKGROUP
   name resolve order = bcast host
   passdb backend = tdbsam
   printing = cups
   printcap name = cups
   printcap cache time = 750
   cups options = raw
   map to guest = Bad User
   logon path = \\%L\profiles\.msprofile
   logon home = \\%L\%U\.9xprofile
   logon drive = P:
   usershare allow guests = Yes
   security = domain
   usershare max shares = 100
   netbios name = PROXY-64
   wins support = Yes

[homes]
   comment = Home Directories
   valid users = %S, %D%w%S
   browseable = No
   read only = No
   inherit acls = Yes

[profiles]
   comment = Network Profiles Service
   path = %H
   read only = No
   store dos attributes = Yes
   create mask = 0600
   directory mask = 0700

[users]
   comment = All users
   path = /home
   read only = No
   inherit acls = Yes
   veto files = /aquota.user/groups/shares/

[groups]
   comment = All groups
   path = /home/groups
   read only = No
   inherit acls = Yes

[printers]
   comment = All Printers
   path = /var/tmp
   printable = Yes
   create mask = 0600
   browseable = No

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/drivers
   write list = @ntadmin root
   force group = ntadmin
   create mask = 0664
   directory mask = 0775



Examples of:

/var/lib/samba/usershares/documents:
Code:

#VERSION 2
path=/home/jack/Documents
comment=
usershare_acl=S-1-1-0:F
guest_ok=y
sharename=Documents



/var/lib/samba/usershares/downloads:
Code:

#VERSION 2
path=/home/jack/Downloads
comment=
usershare_acl=S-1-1-0:F
guest_ok=y
sharename=Downloads



3.) This is the fstab file from my OpenSuse PC's:
Code:

/dev/md1    swap                swap     defaults        0 0
/dev/md2    /                   ext4     acl,user_xattr  1 1
/dev/md0    /boot               ext4     acl,user_xattr  1 2
/dev/md3    /home               ext4     acl,user_xattr  1 2
proc        /proc               proc     defaults        0 0
sysfs       /sys                sysfs    noauto          0 0
debugfs     /sys/kernel/debug   debugfs  noauto          0 0
usbfs       /proc/bus/usb       usbfs    noauto          0 0
devpts      /dev/pts            devpts   mode=0620,gid=5 0 0
/dev/md4    /VirtualBox         ext4     acl,user_xattr  1 2
/dev/sdd9   /mnt/sdd9           ext4     defaults        1 2



4.) This is the fstab file from my Gentoo PC:
Code:

# <fs>      <mountpoint>  <type>  <opts>          <dump/pass>
/dev/sda1   /boot         ext4    noauto,noatime  1 2
/dev/sda6   /             ext4    noatime         0 1
/dev/sda7   /home         ext4    noatime         0 2
/dev/sda5   none          swap    sw              0 0
/dev/cdrom  /mnt/cdrom    auto    noauto,user     0 0
# /dev/fd0  /mnt/floppy   auto    noauto          0 0



Thanks in advance for your help.


Last edited by C5ace on Sun Dec 29, 2013 7:00 am; edited 2 times in total
Back to top
View user's profile Send private message
dataking
Apprentice
Apprentice


Joined: 20 Apr 2005
Posts: 251

PostPosted: Mon Dec 23, 2013 6:49 pm    Post subject: Reply with quote

You should use code tags when posting config files to help separate post content. Moderators?
_________________
-= the D@7@k|n& =-
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 266
Location: Brisbane, Australia

PostPosted: Tue Dec 24, 2013 7:06 am    Post subject: Reply with quote

dataking wrote:
You should use code tags when posting config files to help separate post content. Moderators?


Done.

Have a Merry Christmas.
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2889
Location: Illinois, USA

PostPosted: Tue Dec 24, 2013 1:25 pm    Post subject: Reply with quote

From one of my machines:
Code:
 emerge -pv samba

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R    ] net-fs/samba-3.6.22  USE="acl aio client cups fam netapi pam readline server smbclient syslog winbind -addns -ads -avahi -caps -cluster -debug -dmapi -doc -examples -ldap -ldb -quota (-selinux) -smbsharemodes -swat" 0 kB

Total: 1 package (1 reinstall), Size of downloads: 0 kB

I can't say this is perfect because samba seems to require a windows machine on the network, but at least windows can see and share with the Gentoo machines.

My /etc/samba/smb.conf is 543 lines but this part may be relevant:
Code:
   hosts allow = 192.168.0.  127.
   allow hosts = 192.168.0.100 192.168.0.102   127.


Are you having emerge problems? Or problems running? (did you do rc-update?) or problems connecting? If so, Windows to Linux or Linux to Windows or Linux to Linux?
Back to top
View user's profile Send private message
666threesixes666
Veteran
Veteran


Joined: 31 May 2011
Posts: 1248
Location: 42.68n 85.41w

PostPosted: Tue Dec 24, 2013 8:51 pm    Post subject: Reply with quote

just make sure to enable samba use flag in /etc/portage/make.conf

then
(as root)
emerge -avuND world

i use xfce4 with some gnome apps, thunar with gvfs + samba use flag makes it so i can browse through shares i did previous works on samba to get right clicking auto shares working but i haven't gone over that recently.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1968

PostPosted: Sat Dec 28, 2013 2:42 pm    Post subject: Reply with quote

I use Samba without a Windows box around, although my laptop also logs into
Windows WORKGROUP domains without problems. Adding "samba" to the
make.conf USE flags pulls in a lot of code, but is probably the best way to
start debugging the setup. If you just want to access a Samba server, then
cifs-utils will do the job.

There was a period a few years ago when Samba had problems updating
file status, but apart from that it's been entirely solid.


Will
Back to top
View user's profile Send private message
C5ace
Apprentice
Apprentice


Joined: 23 Dec 2013
Posts: 266
Location: Brisbane, Australia

PostPosted: Sun Dec 29, 2013 7:06 am    Post subject: [SOLVED] Samba on Gentoo Reply with quote

Thanks everyone for the inspirations. The system now works. I will rebuild and document the installation during the next week or so and post the the various configuration files to be used by others as a simple "howto".
Back to top
View user's profile Send private message
Tony0945
Advocate
Advocate


Joined: 25 Jul 2006
Posts: 2889
Location: Illinois, USA

PostPosted: Sun Dec 29, 2013 10:14 pm    Post subject: Reply with quote

Looking forward to it, C5ace.
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