Xfce Forum

Sub domains
 

You are not logged in.

#1 2022-11-02 13:36:21

inukaze
Member
Registered: 2014-07-31
Posts: 46

[SOLVED] Xfce 4.16 - Thunar Samba Network Browsing ? ( Ubuntu 22.04 )

Hi there, i am looking for the better way to fix this :

Thunar-Samba-001.png
Thunar-Samba-002.png

As you can see, inside the Thunar in the protocols

network:/// : Inside just exist « Windows Network » / « Red de Windows » ( my s.o lang is spanish )
smb:/// : is empty

But if i put directly smb://hostname [ i already have configure in /etc/hosts file ] i can access, but my point is fix the hosts appears in the network:/// protocol and in smb:/// protocol inside thunar.

Thunar-Samba-003.png
Thunar-Samba-004.png
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Right now i am under Ubuntu 22.04, using Version 4.15.9-Ubuntu . i know to make « Network » / « Red » appears on thunar the minimun packages the user must install are : gvfs-backend gvfs-fuse libsmbclient

The first answer i go to publish is the things i do to make my samba works on home environment just for domestic use. Because the « askubuntu » forum, my answer not have enough quality for publish my answer. that was yesterday i already have write all things, i just need adjust text for this forum XD

Last edited by inukaze (2022-11-02 20:50:10)

Offline

#2 2022-11-02 14:14:24

inukaze
Member
Registered: 2014-07-31
Posts: 46

Re: [SOLVED] Xfce 4.16 - Thunar Samba Network Browsing ? ( Ubuntu 22.04 )

First configure Windows Machine [ Just if you are using samba for Domestic usage ]

Remember if on home environtment if you are under Windows Vista / 7 or greather
you can do the follow, first  Run

gpedit.msc

Find:
Console Root -> Local Computer Policy -> Computer Configuration -> Windows Settings -> Security Settings -> Local Policies -> Security Options

When you're there change the following policies

Microsoft network client: Send unencrypted password to third-party SMB server: Switch it to "Enabled".
win7-001.png

Network security: LAN Manager authentication level: Select the option: Send LM & NTLM - use NTLMv2 session security if negotiated.
win7-002.png

Well its time to clean samba secrets and/or passwords using SeaHorse
just for not have errors like not accepted password when is the correct credential right now. i lost a lot of time for this XD.

seahorse.png

If you don't wanna share things like "C$", "ADMIN$", "IPC$", you should do the follow
Open the "regedit" with administrative rights and go to follow registry sub-key :

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\LanmanServer\Parameters\AutoShareServer

Create or Edit the sub-key called "AutoShareServer" must be type "REG_DWORD" and set to "0"
Close edit box, and close the registry editor. now open a cmd with administravive rights
and use the follow commands :

net share "ADMIN$" /delete
net share "IPC$" /delete
net share "C$" /delete
net stop server
net start server

Finish.

Installing & Configuring Samba under Ubuntu 22.04 :

first install this packages :

sudo su

apt-get upgrade -y ; apt-get autoremove -y ; apt-get clean ; apt-get install -y gvfs-backends samba-vfs-modules smbnetfs gvfs-fuse fusesmb libsmbclient smbclient samba-common-bin samba-common samba afuse fuse3 nscd libnss-winbind libnss-mdns libnss-wrapper libnss-resolve libnss3 ; ldconfig

If you wish mpv can access samba files you need install the follow packages :

apt-get install -y libavformat-extra58 kio-fuse fusesmb gvfs-fuse ; ldconfig

For the ffmpeg & mpv smb protocol works you must need restart the entire machine.

libavformat-extra58 : install the support to protocol smb:// for ffmpeg
kio-fuse : enable the support for certain QT Apps
fusesmb gvfs-fuse : part of packages need for apps like Thunar can show the another hosts on network.// protocol

mv /etc/samba/smb.conf /etc/samba.conf.ubuntu2204

second try to determine network interfaces :

unset NetInterface

function NetInterface()
{
eth=("/sys/class/net/eth"*)
est=$(cat "${eth[@]}/operstate" | grep up)
for Interface in "${eth[@]}"; do
Interface=$(echo $Interface | sed 's/\/sys\/class\/net\///g')
done

if [ "$est" == "up" ]; then
echo "The Active Network Interface is : $Interface"
fi
} ; NetInterface

Third set variables :

HOSTS=localhost
WORKGROUP='REDLOCAL'
ALLOWHOSTS='192.168.1.0/24'
INTERFACES="$Interface"

Four : use echo & tee commands to set the samba  configuration file :

echo '[global]
log file=/var/log/log.%m
log level=10
max log size=50
#Deprecated Option#client lanman auth = yes
#Deprecated Option#client ntlmv2 auth = no
dns proxy = no
domain master = no
#Deprecated Option#lanman auth = yes
local master = no
map to guest = Bad password
max log size = 2064
name resolve order = bcast lmhosts host wins
obey pam restrictions = yes
pam password change = yes
panic action = /usr/share/samba/panic-action %d
#passdb backend = tdbsam
passdb backend = smbpasswd
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
preferred master = yes
security = user
server role = standalone server
server string = %U
socket options = TCP_NODELAY IPTOS_LOWDELAY
tls enabled=no
unix password sync = no
username map = /etc/samba/smbpasswd
usershare allow guests = yes
usershare max shares = 777
usershare owner only = no
usershare path = /var/lib/samba/usershares
wins support = yes
workgroup = REDLOCAL
#ORIGINAL#client min protocol = NT1
#ORIGINAL#client max protocol = SMB2
#ORIGINAL#server min protocol = NT1
#ORIGINAL#server max protocol = SMB2
client min protocol = NT1
client max protocol = NT1
server min protocol = NT1
server max protocol = NT1
guest account = nobody
#
#client min protocol = CORE	# Earliest version. No concept of user names.
#client min protocol = COREPLUS	# Slight improvements on CORE for efficiency.
#client min protocol = LANMAN1	# First modern version of the protocol. Long filename support.
#client min protocol = LANMAN2	# Updates to Lanman1 protocol.
#client min protocol = NT1	# Current up to date version of the protocol. Used by Windows NT. Known as CIFS.
#
#client min protocol = SMB2	# Re-implementation of the SMB protocol. Used by Windows Vista and later versions of Windows. SMB2 has sub protocols available.
#client min protocol = SMB2_02	# The earliest SMB2 version.
#client min protocol = SMB2_10	# Windows 7 SMB2 version.
#client min protocol = SMB2_22	# Early Windows 8 SMB2 version.
#client min protocol = SMB2_24	# Windows 8 beta SMB2 version.
#
#				# By default SMB2 selects the SMB2_10 variant.
#
#client min protocol = SMB3	# The same as SMB2. Used by Windows 8. SMB3 has sub protocols available.
#client min protocol = SMB3_00	# Windows 8 SMB3 version. (mostly the same as SMB2_24)
#client min protocol = SMB3_02	# Windows 8.1 SMB3 version.
#client min protocol = SMB3_10	# Early Windows 10 technical preview SMB3 version.
#client min protocol = SMB3_11	# Windows 10 technical preview SMB3 version (maybe final).
multicast dns register = No
invalid users = root
printing = cups
printcap name = cups
load printers = yes
cups options = raw
interfaces = '"$ALLOWHOSTS" "$Interface"',lo 127.0.0.1/8 lo,eth0
hosts allow = '"$ALLOWHOSTS"' 127.0.0.1/8

#Shares :
[Hogar(es)]
comment = Home Directories
create mask = 0700
directory mask = 0700
path = /home
browseable = yes
read only = yes
guest ok = yes

[Impresora(s)]
comment = Todas las impresoras
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

[Controlador(es) de Impresora(s)]
comment = Controladores de Impresoras
path = /var/lib/samba/printers
write list = root
create mask = 0664
directory mask = 0775
guest ok = Yes
browseable = Yes ' | sudo tee /etc/samba/smb.conf

Five enable the samba shares :

USER=inukaze
useradd "$USER" -m -G users
groupadd sambashare
gpasswd -a "$USER" sambashare
mkdir -p "/var/lib/samba/usershares/"
    
chown root:sambashare /var/lib/samba/usershares ; \
chmod 01770 -R /var/lib/samba/usershares

Six : again use echo & tee to write another configuration files :

echo '#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#      nisplus or nis+         Use NIS+ (NIS version 3)
#      nis or yp               Use NIS (NIS version 2), also called YP
#      dns                     Use DNS (Domain Name Service)
#      files                   Use the local files
#      [NOTFOUND=return]       Stop searching if not found so far
#

# passwd: 	files nis
# shadow: 	files nis
# group:  	files nis

passwd: 	compat
group:  	compat

hosts:		files mdns4_minimal [NOTFOUND=return] wins dns mdns4 localhost
networks:       files

services:       files
protocols:      files
rpc:    	files
ethers: 	files
netmasks:       files
netgroup:       files
bootparams:     files

automount:      files
aliases:        files

i had write my own file /etc/hosts file with a lot of manual blocks (because i am from Venezuela, and my connection is max 1Mbps and the ads make a several slowdown on my connection)

echo '#
# hosts		This file describes a number of hostname-to-address
#		mappings for the TCP/IP subsystem.  It is mostly
#		used at boot time, when no name servers are running.
#		On small systems, this file can be used instead of a
#		"named" name server.  Just add the names, addresses
#		and any aliases to this file...
#
# By the way, Arnt Gulbrandsen <agulbra@nvg.unit.no> says that 127.0.0.1
# should NEVER be named with the name of the machine.  It causes problems
# for some (stupid) programs, irc and reputedly talk. :^)
#

# For loopbacking.
127.0.0.1       localhost       local
192.168.1.2     negruto		
192.168.1.3     mrdeath		
192.168.1.4     keeo		
192.168.1.10    geremia		
192.168.1.11    edna		
192.168.1.12    tibisay		
192.168.1.13    sensi		
192.168.1.15    inudroide	
192.168.1.17    inukaze.redirectme.net
# End of hosts.

#Manual Blocked :
#Exception					-> # Reason :
#0.0.0.0 markipli.com				-> # No bloquear puede llevarte hasta capchas que resolver para llegar hasta la descarga.
#0.0.0.0 districtprovocativeforceful.com	-> # HentaiLA (Reproductor de HLA)
#0.0.0.0 anhdep24.com - Lo usa dw-anime.net para permitir acceder a los sitios de descarga

#RollerCoin ADS:
0.0.0.0 cdn.bmcdn1.com
0.0.0.0 bitmedia.io

#Everything i want to block
0.0.0.0 *.ersfeeiling.fun
0.0.0.0 aditmedia.g2afse.com
0.0.0.0 aliexpress.com
0.0.0.0 alternativecpmgate.com
0.0.0.0 anymoresentencevirgin.com
0.0.0.0 apolune.sites.google.com
0.0.0.0 apuestasfree.com
0.0.0.0 attemptsbetween.com
0.0.0.0 ausoafab.net
0.0.0.0 baalamaala.com
0.0.0.0 bestanimegame.com
0.0.0.0 betotodilea.com
0.0.0.0 bexmirror.blogspot.com
0.0.0.0 bgsearch.net
0.0.0.0 black-mode-for-browser.site
0.0.0.0 blockadsnot.com
0.0.0.0 braggingreorganizeunderworld.com
0.0.0.0 btc-alpha.com
0.0.0.0 chingari.io
0.0.0.0 cochadocto.com
0.0.0.0 coinmarketcap.com
0.0.0.0 crabdefend.com
0.0.0.0 crjpingate.com
0.0.0.0 cryptotabbrowser.com
0.0.0.0 demotzincky.casa
0.0.0.0 denetsuk.com
0.0.0.0 displayvertising.com
0.0.0.0 dooloust.net
0.0.0.0 doubleadserve.com
0.0.0.0 dreamsnest.com
0.0.0.0 dreamtennager.online
0.0.0.0 eauric.com
0.0.0.0 erofound.com
0.0.0.0 es.bongacams.com
0.0.0.0 es.stripchat.com
0.0.0.0 eu.dspultra.com
0.0.0.0 faptool.com
0.0.0.0 fattyziren.blogspot.com
0.0.0.0 faucet77.tk
0.0.0.0 fbmedia-bls.com
0.0.0.0 femme4.com
0.0.0.0 findingwebsite.com
0.0.0.0 ftx.com
0.0.0.0 gdimx.mblingh.club
0.0.0.0 ghb.adtelligent.com
0.0.0.0 goimovies.com
0.0.0.0 gp.trcked.me
0.0.0.0 hentaiheroes.com
0.0.0.0 hhh.cocinassalvador.com
0.0.0.0 highperformancecpmnetwork.com
0.0.0.0 hugregregy.pro
0.0.0.0 hungrygrizzly.com
0.0.0.0 hurirk.net
0.0.0.0 ibezze.com
0.0.0.0 icrypto.media
0.0.0.0 inflectionquake.com
0.0.0.0 inspectorstrongerpill.com
0.0.0.0 install.mysearchconverters.com
0.0.0.0 install.quickpdfconvertersearch.com
0.0.0.0 install.yoursearchconverter.com
0.0.0.0 installmentloan7vrt.org
0.0.0.0 iociley.com
0.0.0.0 iphone12pro.luckywinner-web1.com
0.0.0.0 iqbroker.com
0.0.0.0 jeglepodu.pro
0.0.0.0 join.worldoftanks.com
0.0.0.0 jomtingi.net
0.0.0.0 jump.ogtrk.net
0.0.0.0 jwbvdz.womenforyou.net
0.0.0.0 kotikinar2ko8tiki09.com
0.0.0.0 lehtymns.com
0.0.0.0 lite-1x0538378.top
0.0.0.0 lite-1x1715273.top
0.0.0.0 lowtyruntor.com
0.0.0.0 lp.storagesafe.cloud
0.0.0.0 maroopush.com
0.0.0.0 mokklachookla.com
0.0.0.0 movie-river.com
0.0.0.0 moviez4all.online
0.0.0.0 network.nutaku.net
0.0.0.0 niceanimegames.com
0.0.0.0 nicsorts-accarade.com
0.0.0.0 nutaku.net #https://www.nutaku.net/games/horny-arcana/play/
0.0.0.0 only4leaked.com
0.0.0.0 onlyleaks.eu
0.0.0.0 onlyleaks.pro
0.0.0.0 otnolatrnup.com
0.0.0.0 p2pb2b.io
0.0.0.0 passworddrunkenheating.com
0.0.0.0 perfunctoryfrugal.com
0.0.0.0 planningunavoidablenull.com
0.0.0.0 profitedsurvey.online
0.0.0.0 promo.worldofwarships.com
0.0.0.0 pronunciationspecimens.com
0.0.0.0 prpops.com
0.0.0.0 publicananker.com
0.0.0.0 pubmaner5.com
0.0.0.0 qd-file.com
0.0.0.0 qualitydestructionhouse.com
0.0.0.0 rbgbq.fantasysexgame.net
0.0.0.0 read-the-news.online
0.0.0.0 recentrecentturf.com
0.0.0.0 redibidilidi.com
0.0.0.0 registeredbabbledrive.com
0.0.0.0 regnation.ru
0.0.0.0 remove-ads.xyz
0.0.0.0 rushbitcoin.com
0.0.0.0 sadassemblybladder.com
0.0.0.0 sale.aliexpress.com
0.0.0.0 scorchthorny.com
0.0.0.0 searchsecurer.com
0.0.0.0 shortwatches.org
0.0.0.0 simcast.com
0.0.0.0 smallfunnybears.com
0.0.0.0 specgoal.com
0.0.0.0 special-offer.0f94yd7l0z2i.top
0.0.0.0 stackpath.bootstrapcdn.com
0.0.0.0 stawhoph.com
0.0.0.0 syndication.realsrv.com
0.0.0.0 syrsple2se8nyu09.com
0.0.0.0 taghaugh.com
0.0.0.0 taghaugh.com
0.0.0.0 thebestgame2020.com
0.0.0.0 theonlygames.com
0.0.0.0 totalwownews.com
0.0.0.0 unforgivablegrowl.com
0.0.0.0 untallen.com
0.0.0.0 user-shield.com
0.0.0.0 utopia-network.es
0.0.0.0 veephept.com
0.0.0.0 ver.acceder.gratis
0.0.0.0 waaw.to
0.0.0.0 worldoftanks.com
0.0.0.0 worldofwarships.com
0.0.0.0 wsecurely.tilda.ws
0.0.0.0 ww12.namesakeoscilloscopemarquis.com
0.0.0.0 www.1clic1don.fr
0.0.0.0 www.adspredictiv.com
0.0.0.0 www.bitwellex.com
0.0.0.0 www.dexpredict.com
0.0.0.0 www.digifinex.com
0.0.0.0 www.effectivecpmcontent.com
0.0.0.0 www.first-mirror.com
0.0.0.0 www.freefundolls.net
0.0.0.0 www.gearbest.com
0.0.0.0 www.get-express-vpns.com
0.0.0.0 www.getsmartyapp.com
0.0.0.0 www.onclickclear.com
0.0.0.0 www.perversas.cl
0.0.0.0 www.pootin.dog
0.0.0.0 www.thisapp.tech
0.0.0.0 www.trustedcpmrevenue.com
0.0.0.0 www.xm.com
0.0.0.0 xhqxmovies.com
0.0.0.0 ymltd.online
0.0.0.0 zunsoach.com
0.0.0.0 onmarshtompor.com
0.0.0.0 l.totalwownews.com
0.0.0.0 lowtyruntor.com
0.0.0.0 effusedprankle.com
0.0.0.0 dexchangegenius.com
0.0.0.0 c1.telemovil.tv
0.0.0.0 www.richsearch.digital
0.0.0.0 ausoafab.net
0.0.0.0 bestanimegame.com
0.0.0.0 betotodilea.com
0.0.0.0 black-mode-for-browser.site
0.0.0.0 blockadsnot.com
0.0.0.0 btc-alpha.com
0.0.0.0 chingari.io
0.0.0.0 coinmarketcap.com
0.0.0.0 crjpingate.com
0.0.0.0 doubleadserve.com
0.0.0.0 dreamsnest.com
0.0.0.0 femme4.com
0.0.0.0 inflectionquake.com
0.0.0.0 iphone12pro.luckywinner-web1.com
0.0.0.0 jeglepodu.pro
0.0.0.0 passworddrunkenheating.com
0.0.0.0 planningunavoidablenull.com
0.0.0.0 qualitydestructionhouse.com
0.0.0.0 smallfunnybears.com
0.0.0.0 specgoal.com
0.0.0.0 special-offer.0f94yd7l0z2i.top
0.0.0.0 syndication.realsrv.com
0.0.0.0 unforgivablegrowl.com
0.0.0.0 www.1clic1don.fr
0.0.0.0 www.effectivecpmcontent.com
0.0.0.0 www.pootin.dog
0.0.0.0 www.xm.com
0.0.0.0 xhqxmovies.com
0.0.0.0 get.streamspotsearch.com
0.0.0.0 join.worldoftanks.eu
0.0.0.0 ngx10.xyz
0.0.0.0 effusedprankle.com
0.0.0.0 thatsthefinger.com
0.0.0.0 mybeautyland.shop
0.0.0.0 chaturbate.com
0.0.0.0 adultfriendfinder.com
0.0.0.0 ofans.co
0.0.0.0 ofleakednow.co
0.0.0.0 pornheaven.xyz
0.0.0.0 finderfans.com
0.0.0.0 popuzothe.com
0.0.0.0 sexu.com
0.0.0.0 rstrc.cc
0.0.0.0 www.sexselector.com
0.0.0.0 getleaksof.com
0.0.0.0 chaturbate.com
0.0.0.0 pigeonreports.com
0.0.0.0 topleaks.co
0.0.0.0 www.vervesex.com
0.0.0.0 topofleaked.co
0.0.0.0 ofleakedcontent.co
0.0.0.0 www.pornteen123.com
0.0.0.0 ofleaks24.co
0.0.0.0 leakedcontent.co
0.0.0.0 007leaks.co
0.0.0.0 pigeonreports.com
0.0.0.0 megadownloads.cloud
0.0.0.0 file2share.co
0.0.0.0 ofpack.net
0.0.0.0 sexy-egirls-leaked.com
0.0.0.0 megaloads.co
0.0.0.0 jump.ogtrk.net
0.0.0.0 coinmarketcap.com
0.0.0.0 iphone12pro.luckywinner-web1.com
0.0.0.0 niceanimegames.com
0.0.0.0 gredraus.net
0.0.0.0 saumeechoa.com
0.0.0.0 bestanimegame.com
0.0.0.0 www.moviesearch.org
0.0.0.0 omicronco.in
0.0.0.0 www.legendsworld.net
0.0.0.0 www.advanceduninstaller.com
0.0.0.0 elcriptomonedas.com
0.0.0.0 lite-1x504901.top
0.0.0.0 taghaugh.com
0.0.0.0 www.alp.com
0.0.0.0 bclikeqt.com
0.0.0.0 www.pionex.com
0.0.0.0 legendsworld.net
0.0.0.0 www.1clic1don.fr
0.0.0.0 mybeautyland.shop
0.0.0.0 best2019-games-web20.com
0.0.0.0 advcash.com
0.0.0.0 snoreempire.com
0.0.0.0 delayeddisembroildisembroil.com
0.0.0.0 crumbtypewriterhome.com
0.0.0.0 captivatepestilentstormy.com
0.0.0.0 accordaudienceeducational.com
0.0.0.0 45.136.49.14
0.0.0.0 onmarshtompor.com
0.0.0.0 agacelebir.com
0.0.0.0 yonxatuor.com
0.0.0.0 forfrogadiertor.com
0.0.0.0 oaphoace.net
0.0.0.0 static.olymptrade.com
0.0.0.0 6jhsbdfsdf66.monster
0.0.0.0 agencyorquidea.com
0.0.0.0 www.googleadservices.com
0.0.0.0 www.centerserv.com
0.0.0.0 denetsuk.com
0.0.0.0 toapodazoay.com
0.0.0.0 go.deliverymodo.com
0.0.0.0 www.gearbest.com
0.0.0.0 scriptvealpatronage.com
0.0.0.0 defiyield.app
0.0.0.0 antiadblocksystems.com
0.0.0.0 dirty.games
0.0.0.0 www.securegfm.com
0.0.0.0 theonlygames.com
0.0.0.0 tendencysanction.com
0.0.0.0 whitebit.com
0.0.0.0 cdn4ads.com
0.0.0.0 tq.adventurefeeds.com
#0.0.0.0 livestudentccc-my.sharepoint.com # Puede que sea OneDrive XD
#0.0.0.0 irana.wordshipopa.xyz	# Podria no permitir acceder a varios sitios de descarga si lo bloqueas
0.0.0.0 www.cryptopricelist.com
0.0.0.0 eshouloo.net
0.0.0.0 ad.bitonsoccer.co
0.0.0.0 free3dgame.xyz
0.0.0.0 beautifulbeachtab.com
0.0.0.0 23n.linkchangesnow.com
0.0.0.0 www.balticmedia.com
0.0.0.0 es.stripchat.com
0.0.0.0 onebitco.com
0.0.0.0 ashoupsu.com
#0.0.0.0 nodsd.com	-> No bloquees es una version nueva de Ad.fly
0.0.0.0 soft3arbi.com
0.0.0.0 fieslobwg.com
0.0.0.0 cambogiadietultra.com
0.0.0.0 tuwebdecero.com
0.0.0.0 vigilanciafacil.com
0.0.0.0 mgcicjfqyfik.com
0.0.0.0 www.degoticapunk.xyz
0.0.0.0 elnuevoentrepreneur.com
0.0.0.0 disurm.com
0.0.0.0 beautifulbeachtab.com
#0.0.0.0 www.gositestat.com #Comprueba que eres humano para permitirte descargar archivos, de sitios como YTSubtitles
0.0.0.0 o2online.es
0.0.0.0 dooloust.net
0.0.0.0 ultrapartners.co
0.0.0.0 onmarshtompor.com
0.0.0.0 getflowext.com
0.0.0.0 rainbow-searches.com
0.0.0.0 bestfriendtab.com
0.0.0.0 www.predictionds.com
0.0.0.0 www.avast.com
0.0.0.0 cinecalidad.ws		#Solo permite ver contenido en linea
#0.0.0.0 cinecalidad.run	#Los enlaces Magneticos y Torrentes se suelen colgar en «Descargando Metadatos» y jamas iniciar la descarga
0.0.0.0 cinecalidad.lol		#Los enlaces Magneticos y Torrentes se suelen colgar en «Descargando Metadatos» y jamas iniciar la descarga
0.0.0.0 cinecalidad.link	#Los enlaces Magneticos y Torrentes se suelen colgar en «Descargando Metadatos» y jamas iniciar la descarga
0.0.0.0 athyimmesa.shop
0.0.0.0 s.viinxd.com
0.0.0.0 supertelligent.com
0.0.0.0 bipedhematin.website
0.0.0.0 achcdn.com
0.0.0.0 ak.inaltariaon.com
0.0.0.0 specgoal.com
0.0.0.0 netflixsubscribe.3kfepd031gjg.top
0.0.0.0 www.find-searches.network
0.0.0.0 waytobigs.com
0.0.0.0 netflixsubscribe.3kfepd031gjg.top
0.0.0.0 bc.game
0.0.0.0 cut-y.com
0.0.0.0 dappsupportchain.com
0.0.0.0 www.videeza.com
0.0.0.0 eu.dspsuper.com
0.0.0.0 bringsconserve.com
0.0.0.0 popmyads.com
0.0.0.0 letsdoeit.com
0.0.0.0 twndo77864.com
0.0.0.0 devteam.mobi
0.0.0.0 phptravels.vn
0.0.0.0 longaboo.com
0.0.0.0 watchadsfree.com
0.0.0.0 findinganewway.com
0.0.0.0 landers.errors.net
0.0.0.0 www.juegaenlinea.net
0.0.0.0 personalizedtab.com
0.0.0.0 www.dexchangegenius.com
0.0.0.0 watch-online.*.top
0.0.0.0 ad-free.info' | sudo tee /etc/hosts

Seven : allow Ports & Hosts using iptables, use smbpasswd to ser samba user password ,use testparm command to check configuration of samba is correct, restart services winbind, nmbd, smbd, and finally use smbtree and smbclient just to check if working.

echo 'iptable interface & ports'
iptables -A INPUT -i "$Interface" -p tcp --dport 137 -j ACCEPT
iptables -A INPUT -i "$Interface" -p udp --dport 137 -j ACCEPT
iptables -A INPUT -i "$Interface" -p udp --dport 138 -j ACCEPT
iptables -A INPUT -i "$Interface" -p tcp --dport 139 -j ACCEPT
iptables -A INPUT -i "$Interface" -p tcp --dport 445 -j ACCEPT
iptables -A INPUT -i "$Interface" -p udp --dport 445 -j ACCEPT
iptables -A INPUT -i "$Interface" -p tcp --dport 901 -j ACCEPT
iptables -A INPUT -i "$Interface" -p udp --dport 137 -s "$ALLOWHOSTS" -j ACCEPT
iptables -A INPUT -i "$Interface" -p udp --dport 138 -s "$ALLOWHOSTS" -j ACCEPT
iptables -A INPUT -i "$Interface" -p tcp --dport 139 -s "$ALLOWHOSTS" -j ACCEPT
iptables -A INPUT -i "$Interface" -p tcp --dport 445 -s "$ALLOWHOSTS" -j ACCEPT
iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns
echo 'Set samba user password, you can set it blank just press enter twice'
USER='inukaze'
smbpasswd -a "$USER"
echo 'Check the samba configuration is correct with testparm'
testparm

Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
    client max protocol = NT1
    client min protocol = NT1
    dns proxy = No
    domain master = No
    interfaces = 192.168.1.0/24 eth0 lo
    local master = No
    map to guest = Bad Password
    max log size = 2064
    multicast dns register = No
    name resolve order = bcast lmhosts host wins
    obey pam restrictions = Yes
    pam password change = Yes
    panic action = /usr/share/samba/panic-action %d
    passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
    passwd program = /usr/bin/passwd %u
    preferred master = Yes
    printcap name = cups
    security = USER
    server max protocol = NT1
    server min protocol = NT1
    server role = standalone server
    server string = %U
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    tls enabled = No
    username map = /etc/samba/smbpasswd
    usershare allow guests = Yes
    usershare max shares = 777
    usershare owner only = No
    wins support = Yes
    workgroup = REDLOCAL
    idmap config * : backend = tdb
    cups options = raw
    hosts allow = 192.168.1.0/24
    invalid users = root


[Hogar(es)]
    comment = Home Directories
    create mask = 0700
    directory mask = 0700
    guest ok = Yes
    inherit acls = Yes
    path = /home/


[Impresora(s)]
    browseable = No
    comment = Todas las impresoras
    create mask = 0600
    path = /var/tmp
    printable = Yes


[Controlador(es) de Impresora(s)]
    comment = Controladores de Impresoras
    create mask = 0664
    directory mask = 0775
    guest ok = Yes
    path = /var/lib/samba/drivers
    write list = root

Restart services :

sudo smbcontrol all reload-config ; samba restart ; sudo service winbind restart ; sudo service nmbd restart ; sudo service smbd restart

Wait around 2 minutes for the services read all reloaded configurations.

smbtree
Password for [REDLOCAL\inukaze]: 

REDLOCAL
    \\EDNA                   
smbc_opendir: Permiso denegado
root@inukaze:/home/inukaze# smbtree
Password for [REDLOCAL\inukaze]:
REDLOCAL
    \\EDNA                   
        \\EDNA\32Bits             
        \\EDNA\ADMIN$             Admin remota
        \\EDNA\C$                 Recurso predeterminado
        \\EDNA\diske-respaldo     
        \\EDNA\DVD-RW             
        \\EDNA\GenyMotion-Esencial   
        \\EDNA\I$                 Recurso predeterminado
        \\EDNA\IPC$               IPC remota
        \\EDNA\ISOS               
        \\EDNA\my games           
        \\EDNA\PELÍCULAS         
        \\EDNA\Publico           
        \\EDNA\Steam             
        \\EDNA\Temporal           
        \\EDNA\Users             
        \\EDNA\Videojuegos       
    \\GEREMIA               
        \\GEREMIA\ADMIN$             Admin remota
        \\GEREMIA\C                  Principal
        \\GEREMIA\C$                 Recurso predeterminado
        \\GEREMIA\D$                 Recurso predeterminado
        \\GEREMIA\Downloads PC       
        \\GEREMIA\E$                 Recurso predeterminado
        \\GEREMIA\F$                 Recurso predeterminado
        \\GEREMIA\Familia           
        \\GEREMIA\G$                 Recurso predeterminado
        \\GEREMIA\H$                 Recurso predeterminado
        \\GEREMIA\Inukaze           
        \\GEREMIA\Inukaze en Familia   
        \\GEREMIA\IPC$               IPC remota
        \\GEREMIA\Josmar             
        \\GEREMIA\Telegram Desktop   
    \\INUKAZE               
        \\INUKAZE\Hogar(es)          Home Directories
        \\INUKAZE\Controlador(es) de Impresora(s)    Controladores de Impresoras
        \\INUKAZE\IPC$               IPC Service (inukaze)
        \\INUKAZE\Público           
WORKGROUP
smbc_opendir: Conexión rehusada

smbclient -L localhost
Password for [REDLOCAL\inukaze]: 

Sharename       Type      Comment
    ---------       ----      -------
    Hogar(es)       Disk      Home Directories
    Controlador(es) de Impresora(s) Disk      Controladores de Impresoras
    IPC$            IPC       IPC Service (inukaze)
    Público        Disk     
Reconnecting with SMB1 for workgroup listing.

    Server               Comment
    ---------            -------

    Workgroup            Master
    ---------            -------
    REDLOCAL             EDNA

smbclient -L geremia
Password for [REDLOCAL\inukaze]: 

Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Admin remota
    C               Disk      Principal
    C$              Disk      Recurso predeterminado
    D$              Disk      Recurso predeterminado
    Downloads PC    Disk     
    E$              Disk      Recurso predeterminado
    F$              Disk      Recurso predeterminado
    Familia         Disk     
    G$              Disk      Recurso predeterminado
    H$              Disk      Recurso predeterminado
    Inukaze         Disk     
    Inukaze en Familia Disk     
    IPC$            IPC       IPC remota
    Josmar          Disk     
    Telegram Desktop Disk     
Reconnecting with SMB1 for workgroup listing.

    Server               Comment
    ---------            -------

    Workgroup            Master
    ---------            -------

smbclient -L edna
Password for [REDLOCAL\inukaze]: 

Sharename       Type      Comment
    ---------       ----      -------
    32Bits          Disk     
    ADMIN$          Disk      Admin remota
    C$              Disk      Recurso predeterminado
    diske-respaldo  Disk     
    DVD-RW          Disk     
    GenyMotion-Esencial Disk     
    I$              Disk      Recurso predeterminado
    IPC$            IPC       IPC remota
    ISOS            Disk     
    my games        Disk     
    PELÍCULAS      Disk     
    Publico         Disk     
    Steam           Disk     
    Temporal        Disk     
    Users           Disk     
    Videojuegos     Disk     
Reconnecting with SMB1 for workgroup listing.

    Server               Comment
    ---------            -------

    Workgroup            Master
    ---------            -------

If samba is set to be Standalone server for domestic usage, the file /etc/samba/lmhost must not exist or create conflict

sudo rm -rf /etc/samba/lmhost

Because if that file /etc/samba/lmhost exist, cause fails like this :
xfce-samba-ubuntu2204-006.png

But if i use the IP of that pc in smb protocol, for example smb://192.168.1.11 then connect fine

xfce-samba-ubuntu2204-007.png

sudo rm -rf /etc/samba/lmhost

Force Reload of Xfce esential components :

killall -9 xfdesktop Thunar xfce4-panel

Restart the machine.

Open Thunar and go to " Network " and enter on « Windows Network » now i is working, here screenshots :
xfce-samba-ubuntu2204-001.pngxfce-samba-ubuntu2204-002.pngxfce-samba-ubuntu2204-003.pngxfce-samba-ubuntu2204-004.pngxfce-samba-ubuntu2204-005.png

You can check your share folder list using the follow command :

net usershare info --long

xfce-samba-ubuntu2204-008.png

Last edited by inukaze (2022-11-09 02:37:45)

Offline

#3 2022-11-02 21:12:24

inukaze
Member
Registered: 2014-07-31
Posts: 46

Re: [SOLVED] Xfce 4.16 - Thunar Samba Network Browsing ? ( Ubuntu 22.04 )

Final comment i need to determinate which are just the essential packages and lines on configuration file for make it work with the minimun things.

i forgot you can add « Custom Actions » on Thunar with commands like :

Name : Grant - Read-Only Public Access
Pattern : *
Condition : Folders
Command :

net usershare add %n %f "" Everyone:R guest_ok=y

Name : Grant - Read/Write Public Access
Pattern : *
Condition : Folders
Command :

net usershare add %n %f "" Everyone:F guest_ok=y && chmod 777 %f

Name : Revoke - Public Access
Pattern : *
Condition : Folders
Command :

net usershare delete %n && chmod 755 %f && gvfs-set-attribute %f -t stringv metadata::emblems none

with that just you can use the secondary click over a folder and click the custom action you need for share folder or remove the access to that folder on ease way.

Last edited by inukaze (2022-11-03 20:44:15)

Offline

#4 2022-11-03 16:47:42

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,485

Re: [SOLVED] Xfce 4.16 - Thunar Samba Network Browsing ? ( Ubuntu 22.04 )

inukaze wrote:

Why that IP 127.0.0.53 ?

From "man systemd-resolved:

Additionally, systemd-resolved provides a local DNS stub listener
           on the IP addresses 127.0.0.53 and 127.0.0.54 on the local loopback
           interface. Programs issuing DNS requests directly, bypassing any
           local API may be directed to this stub, in order to connect them to
           systemd-resolved. Note however that it is strongly recommended that
           local programs use the glibc NSS or bus APIs instead (as described
           above), as various network resolution concepts (such as link-local
           addressing, or LLMNR Unicode domains) cannot be mapped to the
           unicast DNS protocol.

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.016 seconds, 10 queries executed - Memory usage: 701.9 KiB (Peak: 770.19 KiB) ]