You are not logged in.

#1 2015-03-29 23:17:32

ErSoul
Member
Registered: 2012-01-26
Posts: 54

[Solved] SMB not sharing as expected.

Hello, this is the thing:

I'm trying to set up the samba server, but I can't access the folders that are supposed to be "public" (it says "Acces Denied", and don't even ask for a password), or have free reading-access with this or any configuration: ¿What am I doing wrong?

Btw, I've tried to access from Windows XP and Debian guests OS without any success...

[global]
        workgroup = VIRTINTERNA
        server string = %h Server
        netbios name = PROBANDO
        log file = /var/log/samba/%m.log
        max log size = 50
        printcap name = /etc/printcap
        dns proxy = No

        username map = /etc/samba/smbusers
        usershare path = /var/lib/samba/usershare
        usershare max shares = 100
        usershare allow guests = Yes
        usershare owner only = False

        idmap config * : backend = tdb
        unix charset = UTF-8
        dos charset = CP932
        map to guest = Bad User
        server max protocol = SMB2

        name resolve order = hosts wins bcast

        guest account = nobody

[homes]
        comment = Home Directories
        read only = No
        browsable = No

[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        print ok = Yes
        browsable = No
[Videos]
        path=/home/user/Videos/
        comment = Videos pa todos
        browsable = Yes
        guest ok = Yes
        read only = Yes
[Prueba]
        path=/home/user/dwhelper
        available = Yes
        comment = sera
        browseable = Yes
        guest ok = yes
        read only = yes
        public = yes
        printable = no

Last edited by ErSoul (2015-03-31 01:27:36)

Offline

#2 2015-03-29 23:25:45

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 623

Re: [Solved] SMB not sharing as expected.

I think that instead of

only guest = yes 

you should have

guest ok = yes

.  I think also that you should have add this

guest account = nobody

and add this "user"  to /etc/passwd but for the start, do the first one, change only guest to a guest ok.

BTW - after this restart all samba system services like smbd and nmbd with systemctl command.

Last edited by firekage (2015-03-29 23:26:53)

Offline

#3 2015-03-29 23:31:25

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

Done without success. Of course I already have the "user" in my passwd file...

Any other suggestion? Please...

Offline

#4 2015-03-29 23:37:58

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

BTW, I did a testparm, and it returns the following (This is now my new smb.conf file):

# Global parameters
[global]
        dos charset = CP932
        workgroup = VIRTINTERNA
        netbios name = PROBANDO
        server string = %h Server
        map to guest = Bad User
        username map = /etc/samba/smbusers
        log file = /var/log/samba/%m.log
        max log size = 50
        server max protocol = SMB2
        name resolve order = hosts wins bcast
        printcap name = /etc/printcap
        dns proxy = No
        usershare allow guests = Yes
        usershare max shares = 100
        usershare owner only = No
        usershare path = /var/lib/samba/usershare
        idmap config * : backend = tdb


[homes]
        comment = Home Directories
        read only = No
        browseable = No


[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        print ok = Yes
        browseable = No


[Videos]
        comment = Videos pa todos
        path = /home/user/Videos/
        guest only = Yes
        guest ok = Yes


[Prueba]
        comment = sera
        path = /home/user/dwhelper
        guest ok = Yes

Offline

#5 2015-03-29 23:47:27

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 623

Re: [Solved] SMB not sharing as expected.

ErSoul wrote:

Done without success. Of course I already have the "user" in my passwd file...

Any other suggestion? Please...

Creating user "nobody" in smb.conf means that no specific user have the rights but all of them, that's it is not "jon" or "andy" added but "nobody" added. I mean that. I don't see error it your smb.conf.


BTW - i had one similar problem related to smb, i fixed it by doing pacman -Rns samba and then installing it again, to the same conf for smb.conf and it workes because earlier i have messed to much smb.

One thing more - i don't see any security paragraph in this config. Maybe it is related to this? I have security

[root@arch_desktop samba]# cat smb.conf | grep -i security
# This option is important for security. It allows you to restrict
# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = user
# Use password server option only with security = server

Last edited by firekage (2015-03-29 23:52:53)

Offline

#6 2015-03-30 00:44:44

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

I re-install it, but now it ask for a login user. And thats, not what I want. My new smb.conf looks like the following:

# Global parameters
[global]
        workgroup = VIRTINTERNA
        server string = Multimedia
        log file = /var/log/samba/%m.log
        max log size = 50
        printcap name = /etc/printcap
        dns proxy = No
        idmap config * : backend = tdb


[homes]
        comment = Home Directories
        read only = No
        browseable = No


[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        print ok = Yes
        browseable = No


[Videos]
        comment = Videos pa todos
        path = /home/user/Videos/
        guest ok = Yes


[Prueba]
        comment = Prueba sera
        path = /home/user/dwhelper
        guest ok = Yes

Offline

#7 2015-03-30 02:45:49

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 623

Re: [Solved] SMB not sharing as expected.

Still, your config is not finished. I tried to check my config for the one folder, ps2 shares, and see this:

[root@arch_desktop firekage]# cat /etc/samba/smb.conf
# 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 (perhaps too
# many!) most of which are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash) 
# is a comment and is ignored. In this example we will use a #
# for commentry and a ; for parts of the config file that you
# may wish to enable
#
# 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]

# workgroup = NT-Domain-Name or Workgroup-Name
   workgroup = WORKGROUP

# server string is the equivalent of the NT Description field
   server string = Samba Server
   netbios name = Arch_desktop

# This option is important for security. It allows you to restrict
# connections to machines which are on your local network. The
# following example restricts access to two C class networks and
# the "loopback" interface. For more examples of the syntax see
# the smb.conf man page
;   hosts allow = xxxxxxx
    #hosts allow =  xxxxxxxx
# if you want to automatically load your printer list rather
# than setting them up individually then you'll need this
   printcap name = /etc/printcap
   load printers = yes

# It should not be necessary to spell out the print system type unless
# yours is non-standard. Currently supported print systems include:
# bsd, sysv, plp, lprng, aix, hpux, qnx
;   printing = bsd

# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
;  guest account = pcguest
   guest account = nobody

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

# Put a capping on the size of the log files (in Kb).
   max log size = 50

# Security mode. Most people will want user level security. See
# security_level.txt for details.
   security = user
# Use password server option only with security = server
;   password server = <NT-Server-Name>

# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
;  username level = 8

# You may wish to use password encryption. Please read
# ENCRYPTION.txt, Win95.txt and WinNT.txt in the Samba documentation.
# Do not enable this option unless you have read those documents
;  encrypt passwords = yes
;  smb passwd file = /etc/samba/smbpasswd

# The following are needed to allow password changing from Windows to
# update the Linux sytsem password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
#        the encrypted SMB passwords. They allow the Unix password
#        to be kept in sync with the SMB password.
;  unix password sync = Yes
;  passwd program = /usr/bin/passwd %u
;  passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*

# Unix users can map to different SMB User names
;  username map = /etc/samba/smbusers

# 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 = /etc/samba/smb.conf.%m

# Configure Samba to use multiple interfaces
# If you have multiple network interfaces then you must list them
# here. See the man page for details.
;   interfaces = 192.168.12.2/24 192.168.13.2/24 

# Configure remote browse list synchronisation here
#  request announcement to, or browse list sync from:
#       a specific host or from / to a whole subnet (see below)
;   remote browse sync = 192.168.3.25 192.168.5.255
# Cause this host to announce itself to local subnets here
;   remote announce = 192.168.1.255 192.168.2.44

# Browser Control Options:
# set local master to no if you don't want Samba to become a master
# browser on your network. Otherwise the normal election rules apply
;   local master = no

# OS Level determines the precedence of this server in master browser
# elections. The default value should be reasonable
;   os level = 33

# Domain Master specifies Samba to be the Domain Master Browser. This
# allows Samba to collate browse lists between subnets. Don't use this
# if you already have a Windows NT domain controller doing this job
;   domain master = yes 

# Preferred Master causes Samba to force a local browser election on startup
# and gives it a slightly higher chance of winning the election
;   preferred master = yes

# Use only if you have an NT server on your network that has been
# configured at install time to be a primary domain controller.
;   domain controller = <NT-Domain-Controller-SMBName>

# Enable this if you want Samba to be a domain logon server for 
# Windows95 workstations. 
;   domain logons = yes

# if you enable domain logons then you may want a per-machine or
# per user logon script
# run a specific logon batch file per workstation (machine)
;   logon script = %m.bat
# run a specific logon batch file per username
;   logon script = %U.bat

# Where to store roving profiles (only for Win95 and WinNT)
#        %L substitutes for this servers netbios name, %U is username
#        You must uncomment the [Profiles] share below
;   logon path = \\%L\Profiles\%U

# All NetBIOS names must be resolved to IP Addresses
# 'Name Resolve Order' allows the named resolution mechanism to be specified
# the default order is "host lmhosts wins bcast". "host" means use the unix
# system gethostbyname() function call that will use either /etc/hosts OR
# DNS or NIS depending on the settings of /etc/host.config, /etc/nsswitch.conf
# and the /etc/resolv.conf file. "host" therefore is system configuration
# dependant. This parameter is most often of use to prevent DNS lookups
# in order to resolve NetBIOS names to IP Addresses. Use with care!
# The example below excludes use of name resolution for machines that are NOT
# on the local network segment
# - OR - are not deliberately to be known via lmhosts or via WINS.
; name resolve order = wins lmhosts bcast

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's 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

# WINS Proxy - Tells Samba to answer name resolution queries on
# behalf of a non WINS capable client, for this to work there must be
# at least one  WINS Server on the network. The default is NO.
;   wins proxy = yes

# DNS Proxy - tells Samba whether or not to try to resolve NetBIOS names
# via DNS nslookups. The built-in default for versions 1.9.17 is yes,
# this has been changed in version 1.9.18 to no.
   dns proxy = no 

# Case Preservation can be handy - system default is _no_
# NOTE: These can be set on a per share basis
;  preserve case = no
;  short preserve case = no
# Default case is normally upper case for all DOS files
;  default case = lower
# Be very careful with case sensitivity - it can break things!
;  case sensitive = no

#============================ Share Definitions ==============================
[homes]
   comment = Home Directories
   browseable = no
   writable = yes

# Un-comment the following and create the netlogon directory for Domain Logons
; [netlogon]
;   comment = Network Logon Service
;   path = /home/netlogon
;   guest ok = yes
;   writable = no
;   share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
;[Profiles]
;    path = /home/profiles
;    browseable = no
;    guest ok = yes


# NOTE: If you have a BSD-style print system there is no need to 
# specifically define each individual printer
[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = yes
# Set public = yes to allow user 'guest account' to print
   guest ok = yes
   writable = yes
   printable = yes

# This one is useful for people to share files
;[tmp]
;   comment = Temporary file space
;   path = /tmp
;   read only = no
;   public = yes

# A publicly accessible directory, but read only, except for people in
# the "staff" group
;[public]
;   comment = Public Stuff
;   path = /home/samba
;   public = yes
;   read only = yes
;   write list = @staff

# Other examples. 
#
# A private printer, usable only by fred. Spool data will be placed in fred's
# home directory. Note that fred must have write access to the spool directory,
# wherever it is.
;[fredsprn]
;   comment = Fred's Printer
;   valid users = fred
;   path = /homes/fred
;   printer = freds_printer
;   public = no
;   writable = no
;   printable = yes

# A private directory, usable only by fred. Note that fred requires write
# access to the directory.
;[fredsdir]
;   comment = Fred's Service
;   path = /usr/somewhere/private
;   valid users = fred
;   public = no
;   writable = yes
;   printable = no

# a service which has a different directory for each machine that connects
# this allows you to tailor configurations to incoming machines. You could
# also use the %u option to tailor it by user name.
# The %m gets replaced with the machine name that is connecting.
;[pchome]
;  comment = PC Directories
;  path = /usr/pc/%m
;  public = no
;  writable = yes

# A publicly accessible directory, read/write to all users. Note that all files
# created in the directory by users will be owned by the default user, so
# any user with access can delete any other user's files. Obviously this
# directory must be writable by the default user. Another user could of course
# be specified, in which case all files would be owned by that user instead.
;[public]
;   path = /usr/somewhere/else/public
;   public = yes
;   only guest = yes
;   writable = yes
;   printable = no

# The following two entries demonstrate how to share a directory so that two
# users can place files there that will be owned by the specific users. In this
# setup, the directory should be writable by both users and should have the
# sticky bit set on it to prevent abuse. Obviously this could be extended to
# as many users as required.
;[myshare]
;   comment = Mary's and Fred's stuff
;   path = /usr/somewhere/shared
;   valid users = mary fred
;   public = no
;   writable = yes
;   printable = no
;   create mask = 0765


[PS2SMB]
comment = Public
browseable = yes
path = /mnt/hd/0425GB_WMASY4698194/PS2SMB/
public = yes
writeable = yes
guest ok = yes

[Arch_home]
comment = Public_home
browseable = yes
path = /home/firekage/
public = yes
writeable = yes
guest ok = no
valid users = firekage

[0160GB]
comment= 0160GB
browseable = yes
path = /mnt/hd/0160GB
public = yes
writeable = yes
guest ok = no
valid users = firekage

[0340GB]
comment = 0340GB
browseable = yes
path = /mnt/hd/0340GB
public = yes
writeable = yes
guest ok = no
valid users = firekage

[0800GB]
comment = 0800GB
browseable = yes
path = /mnt/hd/0800GB
public = yes
writeable = yes
quest ok = no
valid users = firekage

[Arch_mnt]
comment = Arch's_mnt
browseable = yes
path = /mnt/hd/
public = yes
writeable = yes
guest ok = no
valid users = firekage
write list = firekage


[printers]
comment = All_Printers
path= /var/spool/samba
browseable = yes
guest = ok
writeable = yes
printable = yes
create mode = 0700
write list = @adm root firekage nobody
#valid users = @adm root firekage nobody


[root@arch_desktop firekage]# 

works without password for ps2 shares. Of course, /etc/passwd:

[root@arch_desktop firekage]# cat /etc/passwd | grep nobody
nobody:x:99:99:nobody:/:/usr/bin/nologin
[root@arch_desktop firekage]# 

btw:
http://www.debuntu.org/samba-how-to-sha … rpassword/
https://amazingrando.wordpress.com/2007 … word-easy/
https://wiki.samba.org/index.php/Public_Samba_Server

https://wiki.archlinux.org/index.php/Sa … and_tricks

Share files without a username and password

Edit /etc/samba/smb.conf and add the following line:

map to guest = Bad User

After this line:

security = user

Restrict the shares data to a specific interface replace:

;   interfaces = 192.168.12.2/24 192.168.13.2/24

with:

interfaces = lo eth0
bind interfaces only = true

Optionally edit the account that access the shares, edit the following line:

;   guest account = nobody

For example:

   guest account = pcguest

And do something in the likes of:

# useradd -c "Guest User" -d /dev/null -s /bin/false pcguest

Then setup a "" password for user pcguest.

The last step is to create share directory (for write access make writable = yes):

[Public Share]
path = /path/to/public/share
available = yes
browsable = yes
public = yes
writable = no

Note: Make sure the guest also has permission to visit /path, /path/to and /path/to/public, according to http://unix.stackexchange.com/questions … bdirectory

and

Sample Passwordless Configuration

This is the configuration I use with samba 4 for easy passwordless filesharing with family on a home network. Change any options needed to suit your network (workgroup and interface). I'm restricting it to the static IP I have on my ethernet interface, just delete that line if you don't care which interface is used.

/etc/samba/smb.conf

[global]

   workgroup = WORKGROUP

   server string = Media Server

   security = user
   map to guest = Bad User

   log file = /var/log/samba/%m.log

   max log size = 50


   interfaces = 192.168.2.194/24


   dns proxy = no 


[media]
   path = /shares
   public = yes
   only guest = yes
   writable = yes

[storage]
   path = /media/storage
   public = yes
   only guest = yes
   writable = yes

Try also this:
http://serverfault.com/questions/630631 … r-password
He wrote about password asking because samba cannot map guest user to the owner of the directory being shared (explanation in link above).


BTW - shared data/files need to have correct permission.

Last edited by firekage (2015-03-30 03:07:50)

Offline

#8 2015-03-30 09:48:48

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] SMB not sharing as expected.

ErSoul wrote:

I re-install it, but now it ask for a login user. And thats, not what I want. My new smb.conf looks like the following:

Now

map to guest = Bad User

is missing, so a valid user is required. But you should really check the permissions on the shared directories. If you want public access using user "nobody", then nobody needs access to the files.

@firekage: I only understand half of what you're saying, but your config is a bit messy. Twice you have

public = yes
guest ok = no

but "public" and "guest ok" are synonyms for one and the same setting. I also see

guest = ok

and I don't think that's valid.

Offline

#9 2015-03-30 12:27:32

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 623

Re: [Solved] SMB not sharing as expected.

Raynman wrote:
ErSoul wrote:

I re-install it, but now it ask for a login user. And thats, not what I want. My new smb.conf looks like the following:

Now

map to guest = Bad User

is missing, so a valid user is required. But you should really check the permissions on the shared directories. If you want public access using user "nobody", then nobody needs access to the files.

@firekage: I only understand half of what you're saying, but your config is a bit messy. Twice you have

public = yes
guest ok = no

but "public" and "guest ok" are synonyms for one and the same setting. I also see

guest = ok

and I don't think that's valid.

I have public to being visible, and quest ok no for not being able to enter it. Also, this config is from one of my old smb.conf, and in fact, much of the shares, that are here, does not exist now, maybe something was left behind without noticing.


BTW - one link that i posted shows that "map to quest = bad user" does not work, and for an exmaple, i don't use it (ps2 shares) and can acces it even from playstation 2 connected with router and my desktop.

Offline

#10 2015-03-30 13:01:31

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Solved] SMB not sharing as expected.

firekage wrote:

I have public to being visible, and quest ok no for not being able to enter it.

That may be your intention, but that's not what it's supposed to do.

BTW - one link that i posted shows that "map to quest = bad user" does not work, and for an exmaple, i don't use it (ps2 shares) and can acces it even from playstation 2 connected with router and my desktop.

If you mean that serverfault question, that is outdated (using security=share) and the poster managed to get it working, but it is clear that he didn't really understand what he was doing.

The explanation you quoted and the smb.conf man page say

smb.conf(5) wrote:

You should use security = user and map to guest if you want to mainly setup shares without a password (guest shares).

Of course that is not the only possible setup and you can also have normal users without a password.

Offline

#11 2015-03-30 15:31:38

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 623

Re: [Solved] SMB not sharing as expected.

Raynman wrote:

possible setup and you can also have normal users without a password.

What about being able to acces shares in samba without map = bad user? i don't have it, (even according what the man says) and it works.

Offline

#12 2015-03-30 20:47:00

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

The cat /etc/passwd | grep nobody drops the following:

nobody:x:99:99:nobody:/:/bin/false

Is this different from the /bin/nologin ?

My /etc/samba/smb.conf~

# Global parameters
[global]
	workgroup = Virtinterna
	server string = Multimedia
	netbios name = Servidor
	
	security = USER
	log file = /var/log/samba/%m.log
	max log size = 50
	printcap name = /etc/printcap
	dns proxy = No
	idmap config * : backend = tdb
	
	map to guest = Bad User
	guest account = nobody

[homes]
	comment = Home Directories
	read only = No
	browseable = No

[printers]
	comment = All Printers
	path = /var/spool/samba
	printable = Yes
	print ok = Yes
	browseable = No

[Videos]
	comment = Videos pa todos
	path = /home/user/Videos/
	guest ok = Yes
	read only = Yes
	public = yes

[Prueba]
	comment = Prueba sera
	path = /home/user/dwhelper
	guest ok = Yes
	public = yes

Here is the thing, I have the smb.conf~ which is the file that I directly modify. And I do a "testparm smb.conf~ > smb.conf", and the last drops the following (smb.conf):

[global]
        workgroup = VIRTINTERNA
        netbios name = SERVIDOR
        server string = Multimedia
        security = USER
        log file = /var/log/samba/%m.log
        max log size = 50
        printcap name = /etc/printcap
        dns proxy = No
        idmap config * : backend = tdb


[homes]
        comment = Home Directories
        read only = No
        browseable = No


[printers]
        comment = All Printers
        path = /var/spool/samba
        printable = Yes
        print ok = Yes
        browseable = No


[Videos]
        comment = Videos pa todos
        path = /home/user/Videos/
        guest ok = Yes


[Prueba]
        comment = Prueba sera
        path = /home/user/dwhelper
        guest ok = Yes

I can't acces to those shares like a guest...

And the permission for those directories are the following:

drwxr-xr-x 2 user users 4096 Mar 29 11:01 dwhelper/
drwxrwxrwx 1 root root 32768 Mar 25 06:47 Videos/

Note: Videos is a symbolic link to a NTFS partition that I mount with fstab.

Last edited by ErSoul (2015-03-30 20:56:17)

Offline

#13 2015-03-30 21:59:11

firekage
Member
From: Eastern Europe, Poland
Registered: 2013-06-30
Posts: 623

Re: [Solved] SMB not sharing as expected.

About NTFS, how did you mount it?

UUID=155A91812B0F1C46 /mnt/hd/0425GB_WMASY4698194 ntfs-3g defaults 0 2
UUID=5992CA1E531A9138 /mnt/hd/0200GB_F1_dane_ntfs ntfs-3g defaults 0 2

I don't know it symlinks work with it when you mount, i have mounted my shares in fstab.

Last edited by firekage (2015-03-30 21:59:58)

Offline

#14 2015-03-30 22:07:33

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

uhm... Didn't remember that I deleted the entry from fstab... I mount it with a script (it execs when I start my kde session; so its in ~/.kde4/Autostart/mount_windows.sh and it does the following:

#!/bin/bash
mkdir /run/user/1000/WINDOWS/
sudo mount -t ntfs /dev/sda4 /run/user/1000/WINDOWS/

I do this to avoid the local guest user to acces the partition.

So I beleive its not relevant... sorry... But I puted the permissions on the last post!

Offline

#15 2015-03-30 22:13:22

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

uhm... Didn't remember that I deleted the entry from fstab... I mount it with a script (it execs when I start my kde session; so its in ~/.kde4/Autostart/mount_windows.sh and it does the following:

#!/bin/bash
mkdir /run/user/1000/WINDOWS/
sudo mount -t ntfs /dev/sda4 /run/user/1000/WINDOWS/

I do this to avoid the local guest user to acces the partition.

So I beleive its not relevant... sorry... But I puted the permissions on the last post!

Offline

#16 2015-03-31 00:11:27

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

Also as a complement:

The KDE integrated smb client (on my localhost machine), asks for the username and password (even for some usershares that I've as public), and with Windows XP guest, it just gives an "Access Denied" error message with any of the shares.


ABOUT USERSHARE:

I also tried with the smb4k utility, and it browses well, but with the following error messages:

invalid ownership on directory /var/cache/samba/lck
invalid ownership on directory /var/cache/samba/msg

And again, I can't access the shares as a guest (it ask for username/password).

Offline

#17 2015-03-31 00:36:43

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

I think I'm finally getting with the problem...

According to this thread https://wiki.archlinux.org/index.php/Sa … d_password, I must have all the directory tree as accesable by anyone.

My home folder permission is as the following:

[user@ghost-pc ~]$ ls -ld /home/user/
drwx------ 74 user users 4096 Mar 30 19:38 /home/user/

But I've put it like that, because I don't want any other account to see any of my files (except the desirable shared folders) from the pc.

How should I solve this dilemma?

Last edited by ErSoul (2015-03-31 01:02:58)

Offline

#18 2015-03-31 01:15:05

ErSoul
Member
Registered: 2012-01-26
Posts: 54

Re: [Solved] SMB not sharing as expected.

Solved by changing the permissions of my home folder as the following (just with the exec permission to anybody else as this thread suggest: http://unix.stackexchange.com/questions … bdirectory):


drwx--x--x 74 user users 4096 Mar 30 19:38 user

Thanks firekage and Raynman for your time!

Salutes!

Offline

Board footer

Powered by FluxBB