Salve a tutti ho installato Lubuntu, e ho utilizzato e configurato samba come avevo fatto con Ubuntu.

Sul pc windows condivido il Desktop e un hard disk interno "D".

il desktop viene montato correttamente.

per il disco D mi da l'errore:

mount error(13): Permission denied Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

le righe aggiunte al file fstab sono:

//PC-xxxx-xxxx/Desktop /media/Desktop-win/ cifs vers=2.0,credentials=/home/xxxxx/.smbcredentials,iocharset=utf8,gid=1001,uid=1000,file_mode=0777,dir_mode=0777 0 0

//PC-xxxx-xxxx/D /media/HDdiscoF/ cifs vers=2.0,credentials=/home/xxxxx/.smbcredentials,iocharset=utf8,gid=1001,uid=1000,file_mode=0777,dir_mode=0777 0 0

Perchè Desktop non ha problemi invece il disco si? grazie

Questa domanda è segnata come "wiki".

chiesto 14 May '21, 18:25

Loki6667's gravatar image

Loki6667
2025

modificato 15 May '21, 06:52

e se metti "D" al posto di "Disco D" ?

(14 May '21, 21:06) sacarde sacarde's gravatar image

Disco D non è nel file fstab. ho modificato la domanda

(14 May '21, 21:37) Loki6667 Loki6667's gravatar image

che vedi da: sudo smbclient -L 192.168.0.....

(14 May '21, 22:01) sacarde sacarde's gravatar image

do_connect: Connection to 192.168.210 failed (Error NT_STATUS_IO_TIMEOUT)

Cosa significa?

(15 May '21, 06:44) Loki6667 Loki6667's gravatar image

devi mettere l'indirizzo IP del P windows

(15 May '21, 08:06) sacarde sacarde's gravatar image

è l'IP del pc windows io credo che ci sia da configurare i permessi. La mia domanda è sai cosa si deve fare o vai per tentativi?

(15 May '21, 16:00) Loki6667 Loki6667's gravatar image

192.168.210 non e' un IP valido

devi essere sicuro di quale sia il nome esatto della condivisione

(15 May '21, 17:11) sacarde sacarde's gravatar image

Questo è l'output:

    Sharename       Type      Comment
    ---------       ----      -------
    ADMIN$          Disk      Amministrazione remota
    C$              Disk      Condivisione predefinita
    D               Disk      
    D$              Disk      Condivisione predefinita
    Desktop         Disk      
    Documents       Disk      
    F$              Disk      Condivisione predefinita
    IPC$            IPC       IPC remoto
    print$          Disk      Driver della stampante

Continua...

(16 May '21, 07:38) Loki6667 Loki6667's gravatar image

segue...

    Samsung M2020 Series (USB001) Printer   Samsung M2020 Series (USB001)
    Samsung_Printer$ Disk      Samsung Printer data folder
    Users           Disk

Reconnecting with SMB1 for workgroup listing. do_connect: Connection to 192.168.1.210 failed (Error NT_STATUS_RESOURCE_NAME_NOT_FOUND) Unable to connect with SMB1 -- no workgroup available

Domanda, ma ci sei solo tu su questo sito?

(16 May '21, 07:39) Loki6667 Loki6667's gravatar image
  • le directory "Desktop-win" e "HDdiscoF" hanno stessi permessi?

  • cosa hai nel file: /home/...utente.../.smb/smb.conf

p.s. si e' poco trafficato , per maggiori contatti usa il forum italiano o internazionale

(16 May '21, 10:49) sacarde sacarde's gravatar image

c'e' niente di interessante nei log?

/var/log/samba/log.nmbd

/var/log/samba/log.smbd

(16 May '21, 10:54) sacarde sacarde's gravatar image

Questo è il file smb.conf

======================= Global Settings =======================

[global]

Browsing/Identification

Change this to the workgroup/NT-domain name your Samba server will part of

workgroup = WORKGROUP

Samba lo chiama NT1 sul lato client in /etc/samba/smb.conf. sotto workgroup = WORKGROUP aggiungi questo:

client min protocol = NT1

server string is the equivalent of the NT Description field

server string = %h server (Samba, Ubuntu)

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

We want Samba to only log to /var/log/samba/log.{smbd,nmbd}.

Append syslog@1 if you want important messages to be sent to syslog too.

logging = file

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 server" 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

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 config * : backend = tdb ; idmap config * : range = 3000-7999 ; idmap config YOURDOMAINHERE : backend = tdb ; idmap config YOURDOMAINHERE : range = 100000-999999 ; 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 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

;[homes] ; comment = Home Directories ; browseable = 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 = yes ; browseable = yes ; create mask = 0600 ; directory mask = 0700

[printers] comment = All Printers browseable = yes path = /var/spool/samba printable = yes guest ok = yes 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 = yes

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

coll. permanente

ha risposto 16 May '21, 19:14

Loki6667's gravatar image

Loki6667
2025

/var/log/samba/log.smbd

[2021/05/16 07:10:56.791056, 0] ../../source3/smbd/server.c:1775(main) smbd version 4.11.6-Ubuntu started. Copyright Andrew Tridgell and the Samba Team 1992-2019 [2021/05/16 07:10:57.778254, 0] ../../lib/util/become_daemon.c:135(daemon_ready) daemon_ready: daemon 'smbd' finished starting up and ready to serve connections


(16 May '21, 19:21) Loki6667 Loki6667's gravatar image

/var/log/samba/log.nmbd

[2021/05/16 07:10:55.024139, 0] ../../source3/nmbd/nmbd.c:956(main) nmbd version 4.11.6-Ubuntu started. Copyright Andrew Tridgell and the Samba Team 1992-2019 [2021/05/16 07:10:55.191868, 0] ../../lib/util/become_daemon.c:135(daemon_ready) daemon_ready: daemon 'nmbd' finished starting up and ready to serve connections

(16 May '21, 19:22) Loki6667 Loki6667's gravatar image

Domanda:

le directory "Desktop-win" e "HDdiscoF" hanno stessi permessi?

Risposta:

Non so se sia giusto. con Ubuntu funzionava, con Lubuntu no

???

(16 May '21, 19:24) Loki6667 Loki6667's gravatar image
  • vuoi dire che se avvii un live di ubuntu riesci poi a montare le 2 condivisioni
(16 May '21, 20:28) sacarde sacarde's gravatar image

Ciao, si

ho usato Ubuntu 20.10 per alcuni mesi, ma era lento, cioè il portatile che utilizzo è scarso e non lo regge. Comunque si montava le condivisioni.

ma se la riga è da modificare dimmi come.

Grazie

(17 May '21, 06:13) Loki6667 Loki6667's gravatar image

Posso montare tutto, tranne gli hard disk esterni, che non sono di sistema, come appunto il disco D :(

(17 May '21, 07:56) Loki6667 Loki6667's gravatar image
  • l'unica differenza e' che "Desktop-win" e' una directory e "HDdiscoF" una partizione

  • i permessi delle dir di montaggio sono gli stessi?

(17 May '21, 08:58) sacarde sacarde's gravatar image

Ti riferisci a Windows?

Su Windows ho dato i permessi a tutto

(17 May '21, 10:20) Loki6667 Loki6667's gravatar image

le directory su ubuntu /media/Desktop-win e /media/HDdiscoF hanno stessi permessi?

(17 May '21, 10:30) sacarde sacarde's gravatar image

Questo non lo so.

Come si fa a saperlo?

(17 May '21, 12:28) Loki6667 Loki6667's gravatar image

stat /media/Desktop-win

stat /media/HDdiscoF

(17 May '21, 13:34) sacarde sacarde's gravatar image

sergiom@sergio-x540sa:~$ stat /media/Desktop-win

File: /media/Desktop-win

Dim.: 4096 Blocchi: 8 Blocco di IO: 1048576 directory

Device: 35h/53d Inode: 3659174697251019 Coll.: 2

Accesso: (0777/drwxrwxrwx) Uid: ( 1000/ sergiom) Gid: ( 1001/ sergiom)

Accesso : 2021-05-17 14:40:00.114654600 +0200

Modifica : 2021-05-15 12:15:15.344697800 +0200

Cambio : 2021-05-15 12:15:15.344697800 +0200

Creazione: -

(17 May '21, 14:59) Loki6667 Loki6667's gravatar image

sergiom@sergio-x540sa:~$ stat /media/HD-F

File: /media/HD-F

Dim.: 4096 Blocchi: 8 Blocco di IO: 4096 directory

Device: 802h/2050d Inode: 29229063 Coll.: 2

Accesso: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)

Accesso : 2021-05-17 14:39:14.760000000 +0200

Modifica : 2021-05-14 08:55:53.653458469 +0200

Cambio : 2021-05-17 08:27:34.899880323 +0200

Creazione: -

Ho modificato il nome della cartella HDdiscoF

(17 May '21, 15:01) Loki6667 Loki6667's gravatar image
  • mah, prova a dargli gli stessi permessi:

sudo chmod 777 /media/HD-F

  • e fare uguali anche il proprietario

sudo chown 1000:1001 /media/HD-F

(17 May '21, 15:20) sacarde sacarde's gravatar image

E' cambiato l'output

sergiom@sergio-x540sa:~$ stat /media/HD-F

File: /media/HD-F

Dim.: 4096 Blocchi: 8 Blocco di IO: 4096 directory

Device: 802h/2050d Inode: 29229063 Coll.: 2

Accesso: (0777/drwxrwxrwx) Uid: ( 1000/ sergiom) Gid: ( 1001/ sergiom)

Accesso : 2021-05-17 15:16:08.607726441 +0200

Modifica : 2021-05-14 08:55:53.653458469 +0200

Cambio : 2021-05-17 15:43:33.576598880 +0200

Creazione: -

(17 May '21, 15:48) Loki6667 Loki6667's gravatar image

fstab

//PC-xxxxx-xxxxx/F /media/HD-F/ cifs vers=2.0,credentials=/home/sergiom/.smbcredentials,iocharset=utf8,gid=1001,uid=1000,file_mode=0777,dir_mode=0777 0 0

ma mi da sempre:

mount error(13): Permission denied

Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) and kernel log messages (dmesg)

(17 May '21, 15:49) Loki6667 Loki6667's gravatar image

va bene "F" ? al posto di "D" ?

p.s. i permessi su windows sono gli stessi tra le dir : Desktop-win e F ?

(17 May '21, 17:59) sacarde sacarde's gravatar image

si, ho 2 dischi D e F entrambi sono di proprietà di system. ho dato a tutti il permesso di lettura e scrttura sui dischi condivisi. Desktop-win e F hanno gli stessi permessi.

c'è qualcosa che ci sfugge.

ho provato a rifare la cartella sia con nautilus sia con il terminal, ma non funziona.

con windows posso scambiare file e cartelle perchè ho creato una condivisione pubblica con samba, ma non è una soluzione

(17 May '21, 18:11) Loki6667 Loki6667's gravatar image

secondo me l'unica differenza e' che, in windows, D e F sono dei dischi e non delle directory.... potrebbe essere?

p.s. che vedi da: smbclient -L <ip> -U Administrator

(17 May '21, 20:32) sacarde sacarde's gravatar image

Ciao, risolto

Ho acceso i pc questa mattina e tutto funziona. Perchè?

Comunque funziona

Grazie mille per il tuo aiuto

(18 May '21, 05:53) Loki6667 Loki6667's gravatar image
La tua risposta
abilita/disabilita anteprima

Segui questa domanda

Via email:

Una volta eseguito l'accesso potrai iscriverti a tutti gli aggiornamenti qui

Via RSS:

Risposte

Risposte e commenti

Basi di markdown

  • *corsivo* o __corsivo__
  • **grassetto** o __grassetto__
  • collegamento:[testo](http://url.com/ "titolo")
  • immagine?![alt testo](/path/img.jpg "titolo")
  • elenco numerato: 1. Foo 2. Bar
  • per aggiungere un'interruzione di riga, aggiungi due spazi a fine riga e premi «Invio»
  • è supportato anche semplice HTML

Tag:

×353

domanda posta: 14 May '21, 18:25

domanda visualizzata: 708 volte

ultimo aggiornamento: 18 May '21, 05:53

Chiedi è un servizio di supporto gestito da Ubuntu-it. Contattaci!

powered by OSQAPostgreSQL database
Ubuntu e Canonical sono marchi registrati da Canonical Ltd.