Choose style:

Author Topic: Re: How to Use Peppermint 9 as Samba Server - Solved  (Read 1859 times)

0 Members and 1 Guest are viewing this topic.

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: How to Use Peppermint 9 as Samba Server - Solved
« on: August 28, 2018, 07:02:18 am »
Hi,

Iím planning to make Peppermint 9 as samba Server in one of my site in production environment. I want to test the scenarios before implement in production environment. I tried to google to found the way to do samba installation and configuration. Here is lot of ways and approaches and steps to do the same things and it made me confused :-\ what is the right way and steps to follow. Iím looking for your suggestion and steps need to follow which are the best suited to peppermint. Iím sharing scenarios details for your reference.

Scenarios

Target Goal: - To Make Peppermint 9 as Samba Server and share folders as per department wise and map these share to client computers.

Point and Details consider to configuration and samba solution
 
1.   Number of user 40
2.   Client OS Windows 10,Windows 7, Peppermint 6 & 7
3.   Users belong to different department ECS, Sampling, Account, and Temp etc.
4.   User need to create and make members of department name group. So I can manage security through groups instead of user.
5.   Additional 1 TB Hard disk into Server and mount /DATA. And planning to directory structure as below:-
   5.1     User Directory contain Sub Directory ECS, Sampling, Account, Temp
   5.2  User Directory shared with clients. Ownership: administrator: Everyone  and Permission 0750
   5.3  Department directory shared. Ownership:administrator:departmentgroupname and permission 0770 and         
           recursive to subfolder in department folder.
   5.4  Temp folder share data between departments. Ownership: administrator: Everyone and permission 770 with 
           sticky bit.
6.   Package need to install Samba for  samba server
7.   Configure smb.conf file to share folder.
8.   Create smbpassword to access share.
9.   How to map shared folder on windows and Linux clients.

Iím looking for your advice and suggestion how to go further in this.

Regards,

Rajeev Gautam
« Last Edit: September 01, 2018, 06:52:06 am by rajeev2631007 »

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How to Use Peppermint 9 as Samba Server
« Reply #1 on: August 28, 2018, 08:24:58 am »
Doesn't the samba server configuration tool allow you to do this ?

Menu > Settings > Samba

Or in the Peppermint Settings Panel as:-

Network > Samba Shares
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline TonyBronze

  • Trusted User
  • Member
  • *****
  • Posts: 160
  • Karma: 34
  • Peppermintaholic
    • View Profile
  • Peppermint version(s): 8 & 9
Re: How to Use Peppermint 9 as Samba Server
« Reply #2 on: August 28, 2018, 08:43:46 am »
Maybe an idea to install webmin to provide a GUI http://www.webmin.com/
Samba configuration instructions are at  https://doxfer.webmin.com/Webmin/Samba_Windows_File_Sharing
« Last Edit: August 28, 2018, 08:46:04 am by TonyBronze »
......to infinity and beyond..............

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: How to Use Peppermint 9 as Samba Server
« Reply #3 on: August 29, 2018, 12:44:01 am »
Quote
Doesn't the samba server configuration tool allow you to do this ?

Menu > Settings > Samba

Or in the Peppermint Settings Panel as:-

Network > Samba Shares

Thanks PCNetSpec for your prompt reply. I go through this tool. It is good for simple sharing user wise and Individual folder sharing and Individual mapping on client side. My  Scenarios  is little bit complex to handle with it.I'm looking for group wise security and I want to map drive only once ex. smb://smbserver/user for all the user.

Quote
Maybe an idea to install webmin to provide a GUI http://www.webmin.com/
Samba configuration instructions are at  https://doxfer.webmin.com/Webmin/Samba_Windows_File_Sharing

Thanks TonyBronze for your reply and suggestion. I think it might help me to resolve my issue. first I have to learn how to install and configure this on peppermint. If I'll face any issue I'll get back to you. 

Thanks for your help and suggestion.

Warm Regards,

Rajeev Gautam

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How to Use Peppermint 9 as Samba Server
« Reply #4 on: August 29, 2018, 09:27:12 am »
Mapping the drives just once should be easy enough .. just give the server a static IP, then on the clients map by IP rather than hostname.

Access by group .. see the
valid users = @editorial
line here:
https://www.techrepublic.com/article/how-to-set-up-samba-shares-for-groups/
« Last Edit: August 29, 2018, 09:29:17 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: How to Use Peppermint 9 as Samba Server
« Reply #5 on: August 30, 2018, 01:16:21 am »
Quote
Mapping the drives just once should be easy enough .. just give the server a static IP, then on the clients map by IP rather than hostname.

Access by group .. see the
valid users = @editorial
line here:
https://www.techrepublic.com/article/how-to-set-up-samba-shares-for-groups/

Thanks PCNetSpec for give awareness for valid user option.

I'm still stuck with basic and essential  issues which is as below:-

1. I'm using PM6/PM9/Win10 for test purpose. I'm able to ping these computer IP but I'm not able to find these computers in my File Manager-->Networks and Network Option in Win 10. I had tried given below option but still stuck.

1.1   name resolve order = bcast host
1.2  win support = yes
1.3  Enable Network discovery in Win10

2. I'm able to map drive in Win10 but I'm not able to access due to permission or sometime samba is available but it is not connect. I googled and found it can be due to SMB Version issues.Details of OS and their SMB version which able to found as below.

1. XP:-SMBv1/Win7:-SMBv2/Vista:-SMBv2/WinServer2008:-SMBv2/Win8:-SMBv3/Win10vSMBv3/WinServer2012vSMB3
2. PM6 (14.04):-SMBv?/PM8 (16.04):-SMBv?/PM9 (18.04):-SMBv?
 
If I had put min protocol = SMB2 then PM6 stop mapping drive and win 10 same issue able to map but not able to access. I had also tired given below option in smb.conf

server min protocol = SMB2_10
client max protocol = SMB3
client min protocol = SMB2_10

But I'm facing the same issues.

3. I'm still confused how to handle permission to specific group & user after creating folder,sub folder file into share folder. if we create folder or file in samba share it take default linux permission.

I was assuming samba easy to configure as I saw on lot of YouTube video and articles. But there is lot of issues which need to figure out and lot off testing require. Well see where I can reach in this.

I request you please share information and suggestion to overcome from above issues.

Regards,

Rajeev Gautam


Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How to Use Peppermint 9 as Samba Server
« Reply #6 on: August 30, 2018, 06:39:32 am »
I couldn't possibly give you a definitive 'answer' without attempting to replicate the setup .. networking has always been a bit of a black art (even though it''s not supposed to be).

Have you tried allowing all smb versions:
Code: [Select]
client min protocol = NT1
client max protocol = SMB3
?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: How to Use Peppermint 9 as Samba Server
« Reply #7 on: August 30, 2018, 02:32:42 pm »
Quote
1. I'm using PM6/PM9/Win10 for test purpose. I'm able to ping these computer IP but I'm not able to find these computers in my File Manager-->Networks and Network Option in Win 10. I had tried given below option but still stuck.

1.1   name resolve order = bcast host
1.2  win support = yes
1.3  Enable Network discovery in Win10

After Making samba server as win server all the Linux computer start showing in Win 10 Network.

Samba as a WINS server in a Windows Peer Network

https://whereofwecannotspeak.wordpress.com/2007/10/24/samba-as-a-wins-server-in-a-windows-peer-network/

Code: [Select]
Configuring Samba to act as a WINS server is really easy. Just add the following parameters to your smb.conf file:

os level = 99
wins support = yes
name resolve order = wins lmhosts hosts bcast
domain master = yes
preferred master = yes

Still struggling to get Linux and windows computer show in Linux Network option. But I'm able to ping  IP as well as hostname.local between two linux computer.

Warm regards,

Rajeev Gautam
 

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How to Use Peppermint 9 as Samba Server
« Reply #8 on: August 30, 2018, 04:16:40 pm »
Quote
Still struggling to get Linux and windows computer show in Linux Network option

Which Linux distro/version are we talking about ?

I take it they're all part of the same workgroup ?

And are they actually sharing anything ?
« Last Edit: August 30, 2018, 04:18:26 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: How to Use Peppermint 9 as Samba Server
« Reply #9 on: August 30, 2018, 11:58:53 pm »
Quote
Which Linux distro/version are we talking about ?

I take it they're all part of the same workgroup ?

And are they actually sharing anything ?

It is PM8 and PM9 Distro and it is part of the same workgroup. PM9 is my samba server. I had not shared anything right now because I want to clear connectivity part first. 

After making some changes I start showing computer in PM8 (nemo-->Network-->Windows Network--> Workgroup-->list of computer).

1. Disable firewall in PM8 and PM9. (It start automatically after some time I don't know the reason.)
2. change smb.conf in PM8:- netbios name = PM8   and name resolve order = bcast wins lmhosts host
3. I make same changes in PM9 :-netbios name = PM9   and name resolve order = bcast wins lmhosts host

PM9 is  my samba server and it still not showing anything in (nemo-->Network-->Windows Network)

Regards,

Rajeev Gautam




 

Offline TonyBronze

  • Trusted User
  • Member
  • *****
  • Posts: 160
  • Karma: 34
  • Peppermintaholic
    • View Profile
  • Peppermint version(s): 8 & 9
Re: How to Use Peppermint 9 as Samba Server
« Reply #10 on: August 31, 2018, 04:00:54 am »
have you added

Code: [Select]
name resolve order = bcast host
client max protocol = NT1

to your smb.conf ?
......to infinity and beyond..............

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: How to Use Peppermint 9 as Samba Server - Solved
« Reply #11 on: September 01, 2018, 06:51:22 am »
Thanks PCNetSpec and TonyBronze for your input and suggestion.

I got some success and able to share folders between Linux as well as Win10.

I had made some tweaks in samba server smb.conf. Which is as below:-

Code: [Select]
#Win Server
os level = 99
wins support = yes
domain master = yes
preferred master = yes

#netbios name and name resolve order
netbios name = PM9
name resolve order = bcast wins lmhosts host

#SMB Version configuration
client min protocol = NT1
client max protocol = SMB3

[ShareName]
   comment = Share Folder Details
   path = /home/administrator/ShareName
   browseable = yes
   read only = no
   guest ok = no
   valid users = @groupname 

Note:- Disable firewell on both side or allow all ports  port 137, port 138, port 139, port 445

Linux Client side smb.conf file some tweaks as below:-

Code: [Select]
netbios name = PM8	
name resolve order = bcast wins lmhosts host
win server = IP of Win Server

In Windows 10  I had changed TCP/IP setting for Win Server IP  and enable network discover option.

I also sharing some web link for further knowledge.
 
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#SERVERMAXPROTOCOL
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#SERVERMINPROTOCOL
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#SERVERMINPROTOCOL
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#CLIENTMINPROTOCOL
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#CLIENTMAXPROTOCOL
https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html#DIRECTORYMASK


How to Setup a Dedicated Home File Server Using Ubuntu Linux



I hope it will help other peoples in forum who want to use samba.

Regards,

Rajeev Gautam

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25931
  • Karma: 2835
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: How to Use Peppermint 9 as Samba Server - Solved
« Reply #12 on: September 01, 2018, 08:11:38 am »
Cool, good to hear you figured it out .. and thanks for taking the time to post what got you there :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline rajeev2631007

  • Member
  • ***
  • Posts: 234
  • Karma: 24
  • New Forum User
    • View Profile
Re: How to Use Peppermint 9 as Samba Server - Solved
« Reply #13 on: September 07, 2018, 05:10:01 am »
Those people who want to implement samba they should also need to know the concept of how umask and permission work in Linux.Peppermint has default umask is  0002 or symbolic u=rwx g=rwx o=rx .Umask 0002 is perfect if you use groups for permission and few distro use default 0022 umask. as well. 


What is Umask and How To Setup Default umask Under Linux?

https://www.cyberciti.biz/tips/understanding-linux-unix-umask-value-usage.html

Regards,

Rajeev Gautam