Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Server
#21
(06-21-2019, 05:35 AM)muddy Wrote: OK I am REALLY close!

This is my smb.conf:
[global]
server string = 3847
workgroup = 3847
client max protocol = NT1
security = user
map to guest = Bad User
name resolve order = bcast host wins
include = /etc/samba/smbshared.conf

This is my smbshared.conf:
[media]
    force user = phillip
    path = /home/3847/media
    writable = yes
    public = yes

[Media Drive]
    force user = phillip
    path = /home/3847/data
    writable = yes
    public = yes


[data]
    force user = phillip
    path = /home/3847/Media Drive
    writable = yes
    public = yes

I am attaching screen shots of what happens.When I try to open any of the drives I get the same no such file message, I'm thinking it is simple whatever it is but I am missing it.

This morning I tried this smb.conf file:
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which 
# are not shown in this example
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic 
# errors. 

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
 workgroup = 3847
 passdb backend - 2406
 security = user
 usershare owner only = false
 client max protocol = NT1

# server string is the equivalent of the NT Description field
server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
   wins support = yes

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
;   wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
;   interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself.  However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
;   bind interfaces only = yes



#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Cap the size of the individual log files (in KiB).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
#   syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d


####### Authentication #######

# Server role. Defines in which mode Samba will operate. Possible
# values are "standalone server", "member server", "classic primary
# domain controller", "classic backup domain controller", "active
# directory domain controller". 
#
# Most people will want "standalone sever" or "member server".
# Running as "active directory domain controller" will require first
# running "samba-tool domain provision" to wipe databases and create a
# new domain.
   server role = standalone server

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.  
#   passdb backend = tdbsam

   obey pam restrictions = yes

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
   unix password sync = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
   pam password change = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
#   map to guest = bad user

########## Domains ###########

#
# The following settings only takes effect if 'server role = primary
# classic domain controller', 'server role = backup domain controller'
# or 'domain logons' is set 
#

# It specifies the location of the user's
# profile directory from the client point of view) The following
# required a [profiles] share to be setup on the samba server (see
# below)
;   logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
# (this is Samba's default)
#   logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
;   logon drive = H:
#   logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
;   logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe.  The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

# This allows machine accounts to be created on the domain controller via the 
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
;   include = /home/samba/etc/smb.conf.%m

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
;   idmap uid = 10000-20000
;   idmap gid = 10000-20000
;   template shell = /bin/bash

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
   usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
   usershare allow guests = yes

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit) 
# to enable the default home directory shares. This will share each 
# user's home directory as \\server\username
[3487]
   comment = Home Directories
   browseable = yes
   available = yes
   valid users = phillip
   read only = no
   public = yes
   writeable = yes

# By default, the home directories are exported read-only. Change the
# next parameter to 'no' if you want to be able to write to them.
;   read only = yes

# File creation mask is set to 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
;   create mask = 0700

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
;   directory mask = 0700

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server.
# Un-comment the following parameter to make sure that only "username"
# can connect to \\server\username
# This might need tweaking when using external authentication schemes
;   valid users = %S

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
;   comment = Network Logon Service
;   path = /home/samba/netlogon
;   guest ok = yes
;   read only = yes

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
;   comment = Users profiles
;   path = /home/samba/profiles
;   guest ok = no
;   browseable = no
;   create mask = 0600
;   directory mask = 0700

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

####
# This is my drive that I add to all my /home/bruce folder as a sort of temp/hold folder that is shared...
# This folder is made in the /home/bruce as the path= showes
####

[3487]
   comment = 3487 Directories
   path = /home/3487/media
   browseable = yes
   available = yes
   valid users = phillip
   read only = no
   public = yes
   writeable = yes

This works as well and everything shows up only I can't log in with OR without a password. I am SO close!
Reply
#22
Cool so far...
I would add the at the end of the smb.conf
Quote:include = /etc/samba/smbshared.conf

You can just add the "smbshared to the bottom of the main "smb.conf" if you like but the way you have it should work fine... Big Grin

Did you create the "media" folder in your folder?
Quote:# This folder is made in the /home/bruce <----- Look familiar...Lol
####


[3487]
   comment = 3487 Directories

   path = /home/3487/media <--------
   browseable = yes
   available = yes
   valid users = phillip
   read only = no
   public = yes
   writeable = yes

Just want to make sure....

Just some advice before the modiator pokes ya... When posting large lines of test like the "smb.conf", 
be sure to use the little "blue notepad with the <> on top bar near the right side.
that will set the "Code" command and the system will set the text in a scrolling bar section...
Just click on it and a small window will popup and you can past your test there.... That way it is scrollable.... Back to the issue....... Sorry for the digression...Big Grin

Quote:This works as well and everything shows up only I can't log in with OR without a password. I am SO close!

Yes you are close....
You will always have to add your password the first time in the popup when you try to log into the system the first time as a network user and tick the "remember forever"....

Did you use the links  I posted, and set the "samba" password?

You have to add you user password to "samba" so it will know who you are when you try to access the shared drives on the "network"...

In a "terminal" use this command...

Code:
sudo smbpasswd -a phillip

Then enter your "root" password followed by entering your "New Samba Password" Twice and you have a smb password now and samba will ask you for it when you try to log into the you shared folder in a popup.

You may have to set your "firewall ports" also. I don't use one because I am behind a router and a pfsence box to access the internet. My intranet is open in a sense...

Code:
sudo ufw allow in 192.0.0.0/24 any app samba

This should get you pass your firewall if you used the standard "192.168.0.0 or 192.168.1.0" installation and did not change to something else, otherwise use that net for the "192.0.0.0" part of the command....

Please look that the links I posted earlier they should shed more light on this than I can explain... Later!
My lawn is calling "Mow me".... LOL

Oh! I forgot to mention that I commit out the "bad user"...


Code:
This is my smb.conf:
[global]
server string = 3847
workgroup = 3847
client max protocol = NT1
security = user
map to guest = Bad User <-------- with a "#"
name resolve order = bcast host wins
include = /etc/samba/smbshared.conf
 
I do this with a "#" in front of the "map to bad guest = Bad user"...
For a local and one user network it is not needed anymore...

I am sure if I am wrong someone will point out my errors....

After all I am 66 and my brain is a dull pencil and not a sharp tack! Lol
Later!
**********************************************************
Taglines of the Day:
Today is the tomorrow you worried about yesterday.  Huh 

Everybody remember where we parked. - Kirk

To Boldly Go Where No BBS Has Gone Before. USS Stargazer BBS, Sheridan In.
Reply
#23
Thanks for the heads up on posting. I'll be mindful of that from now on.

I have now successfully shared my drives. Sort of. I can see the drives on my network and can open them just fine. However, once I'm in the drive I can't open any of the folders. Plus there seems to be a bit of redundancy. When I open my network I see the following:

network:///dnssd-domain-3847._smb._tcp <---This opens fine and is labeled 3847
network:///smb-server-DESKTOP-H54PD2O <--- This is my BIL's computer so I don't need to get in that
network:///smb-server-HOME <--- Quite frankly don't know what this is. It opens but does't show anything
network:///smb-root <---This is labeled "Windows Netwok>

When I open this:
network:///dnssd-domain-3847._smb._tcp

I get these folders which are on my 4TB drive:
smb://3847.local/._3487
smb://3847.local/._al-anon
smb://3847.local/._blues
smb://3847.local/._christmas
smb://3847.local/._comedy
smb://3847.local/._country
smb://3847.local/._data
smb://3847.local/._documents
smb://3847.local/._gospel
smb://3847.local/._jazz
smb://3847.local/._media
smb://3847.local/._media%20drive
smb://3847.local/._old%20time%20radio
smb://3847.local/._pictures
smb://3847.local/._print$
smb://3847.local/._recovery
smb://3847.local/._rock
smb://3847.local/._soul
smb://3847.local/._video
smb://3847.local/._wavs
smb://3847.local/._wedding

The above folders are what I am most interested in using. I can't get into them either anonymously or with my password. BTW each of the above folders has dozens of sub folders. I have each artist in their own folder and each album in it's on folder so as you can imagine the tree is quite extensive.

When I open this:
network:///smb-root <---This is labeled "Windows Netwok>

I get this:
smb:///3847 <-- This I can't open
smb:///WORKGROUP <---This I get:
smb://workgroup/._desktop-h54pd2o <-- don't need to open
smb://workgroup/._home <-- don't need to open

I hear Joe say how simple linux is but man, I just can't seem to wrap my head around it. You have been most helpful and I am incredibly grateful for all your help so far.
Reply
#24
As you can see in the below link. I have selected my WD drive that is shared as vm-data drive in the fstab when the system boots.
I select the drive and right click anywhere in the white space where there is not a folder and select
"Open As Root".. 
Then you will go to the "Permissions" screen like the screen that I have in the link. make sure that you have all the permissions set as in the screen and make sure that you hit the "Apply Permissions to enclosed settings" button at the left bottom.... Then you can close the window and the Root File manager.

You should now have access to all the files on the drive... I hope...Big Grin

https://drive.google.com/file/d/1f1BHOKg...sp=sharing

It is all about sharing and permissions on the remote drive so you can get to access the drive. As long as you have the drive mounted in the "FSTAB" like my Vm-Data

Code:
#Vm and Data drive on the WD Drive
UUID=8d7eff56-28e7-40a6-9ac7-346b41f5ea74   /vm-data    ext4    defaults    0   2


 and the drive set as shared and in you SMB.conf, the Root is set to read and write you should be ready to go.
In Nemo, You can right click on a folder and select Sharing Options and share just some folders if you don't want to share the hole drive...
Every since changes to Samba there are double entries in the Network view of the File Manager. I have not figured this out, I just live with it and click on the one with (File Sharing) on it.

Maybe someone here can point out how to get rid of the double entries. I think it has something to do with the fact that the SMB.Conf is split into two files now, not sure...

Quote:network:///dnssd-domain-3847._smb._tcp <---This opens fine and is labeled 3847

This is a Permission issue. If it is attached to the network is is seen on the network....

Quote:network:///smb-server-HOME <--- Quite frankly don't know what this is. It opens but does't show anything

This is most likely set in the "smb.conf" under the Tab [Home].....

You have some stuff setup with ./locals and the like and that is more than I do. I like this short and simple. But everyone labels things there way... Lol

Nice assortment of music.... 

I am not sure what else to tell ya at this point.....  Undecided

Later!
**********************************************************
Taglines of the Day:
Today is the tomorrow you worried about yesterday.  Huh 

Everybody remember where we parked. - Kirk

To Boldly Go Where No BBS Has Gone Before. USS Stargazer BBS, Sheridan In.
Reply
#25
(06-25-2019, 05:14 PM)bescott9944 Wrote: As you can see in the below link. I have selected my WD drive that is shared as vm-data drive in the fstab when the system boots.
I select the drive and right click anywhere in the white space where there is not a folder and select
"Open As Root".. 
Then you will go to the "Permissions" screen like the screen that I have in the link. make sure that you have all the permissions set as in the screen and make sure that you hit the "Apply Permissions to enclosed settings" button at the left bottom.... Then you can close the window and the Root File manager.

You should now have access to all the files on the drive... I hope...Big Grin

https://drive.google.com/file/d/1f1BHOKg...sp=sharing

It is all about sharing and permissions on the remote drive so you can get to access the drive. As long as you have the drive mounted in the "FSTAB" like my Vm-Data

Code:
#Vm and Data drive on the WD Drive
UUID=8d7eff56-28e7-40a6-9ac7-346b41f5ea74   /vm-data    ext4    defaults    0   2


 and the drive set as shared and in you SMB.conf, the Root is set to read and write you should be ready to go.
In Nemo, You can right click on a folder and select Sharing Options and share just some folders if you don't want to share the hole drive...
Every since changes to Samba there are double entries in the Network view of the File Manager. I have not figured this out, I just live with it and click on the one with (File Sharing) on it.

Maybe someone here can point out how to get rid of the double entries. I think it has something to do with the fact that the SMB.Conf is split into two files now, not sure...

Quote:network:///dnssd-domain-3847._smb._tcp <---This opens fine and is labeled 3847

This is a Permission issue. If it is attached to the network is is seen on the network....

Quote:network:///smb-server-HOME <--- Quite frankly don't know what this is. It opens but does't show anything

This is most likely set in the "smb.conf" under the Tab [Home].....

You have some stuff setup with ./locals and the like and that is more than I do. I like this short and simple. But everyone labels things there way... Lol

Nice assortment of music.... 

I am not sure what else to tell ya at this point.....  Undecided

Later!
You have gone WAY beyond what most people would do and I really appreciate it very much. I will keep tinkering and when and if I'm successful I'll let you know. 

Thanks again,

Phillip
Reply
#26
Yes I guess I have... Lol It's a OCD thing.... Oh Look Shiny!...  Big Grin
Good Luck!
**********************************************************
Taglines of the Day:
Today is the tomorrow you worried about yesterday.  Huh 

Everybody remember where we parked. - Kirk

To Boldly Go Where No BBS Has Gone Before. USS Stargazer BBS, Sheridan In.
Reply
#27
Hay Moddy,
I found this on Mints website today 6/26/19....
Quote:If you use Samba a lot, until these issues are resolved, we recommend you use Linux Mint 18.3 instead.

I guess there is a issue with Ubuntu's 18.04 Samba and it has filtered down to all the Distros....

Quote:Samba isn't very stable in Ubuntu 18.04.

Go to this link and scroll down and give this a read. It might shed some light on your issues...
Click here ---> Samba issues in 18.04

I for one use Samba all day long but I am on 2 Mint 18.3 and my 2 MX box's are ok, my Solus and Manjaro box are built off of 18.04 and that explains some network issue I have once in a while...  Undecided Sad
Samba was ok until they had to go and change it and screw it up. Nooo, have to get rid of this and add this, bla blabla crap...
It work good for 10 + years just the way it was.....

Thought I would pass this along.... 

LLAP
**********************************************************
Taglines of the Day:
Today is the tomorrow you worried about yesterday.  Huh 

Everybody remember where we parked. - Kirk

To Boldly Go Where No BBS Has Gone Before. USS Stargazer BBS, Sheridan In.
Reply
#28
(06-26-2019, 10:17 PM)bescott9944 Wrote: Hay Moddy,
I found this on Mints website today 6/26/19....
Quote:If you use Samba a lot, until these issues are resolved, we recommend you use Linux Mint 18.3 instead.

I guess there is a issue with Ubuntu's 18.04 Samba and it has filtered down to all the Distros....

Quote:Samba isn't very stable in Ubuntu 18.04.

Go to this link and scroll down and give this a read. It might shed some light on your issues...
Click here ---> Samba issues in 18.04

I for one use Samba all day long but I am on 2 Mint 18.3 and my 2 MX box's are ok, my Solus and Manjaro box are built off of 18.04 and that explains some network issue I have once in a while...  Undecided Sad
Samba was ok until they had to go and change it and screw it up. Nooo, have to get rid of this and add this, bla blabla crap...
It work good for 10 + years just the way it was.....

Thought I would pass this along.... 

LLAP

Thanks, I'm still working on it.
Reply
#29
I reinstalled mint 19 and at one point had plex server running and scanning my drive only it would only scan a couple of directories and would still not show on my network. In the process of trying to fix that plex stopped loading altogether. I used timeshift and went back and started over. Now plex won't scan anything on my external drive. That's the bad news. The good news is that the drive IS showing up on my network! So I am essentially halfway there.
Reply
#30
Success! Plex is scanning as I type this. In the end it was pretty simple. But as most things in life the solution is simple once you know the problem. I followed this:

https://askubuntu.com/questions/395291/p...hard-drive

Thanks again for everyone's help. It took me a few weeks and who knows how many hours but I learned some stuff along the way,

Phillip
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)