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".
5 su 11
mostra altri 6 commenti
|
Questo è il file smb.conf ======================= Global Settings =======================[global] Browsing/IdentificationChange this to the workgroup/NT-domain name your Samba server will part ofworkgroup = 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 fieldserver string = %h server (Samba, Ubuntu) NetworkingThe specific set of interfaces / networks to bind toThis 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 isnot protected by a firewall or is a firewall itself. However, thisoption cannot handle dynamic or non-broadcast interfaces correctly.; bind interfaces only = yes Debugging/AccountingThis tells Samba to use a separate log file for each machinethat connectslog 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 backtracepanic action = /usr/share/samba/panic-action %d # AuthenticationServer role. Defines in which mode Samba will operate. Possiblevalues are "standalone server", "member server", "classic primarydomain controller", "classic backup domain controller", "activedirectory domain controller".Most people will want "standalone server" or "member server".Running as "active directory domain controller" will require firstrunning "samba-tool domain provision" to wipe databases and create anew domain.server role = standalone server obey pam restrictions = yes This boolean parameter controls whether Samba attempts to sync the Unixpassword with the SMB password when the encrypted SMB password in thepassdb is changed.unix password sync = yes For Unix password sync to work on a Debian GNU/Linux system, the followingparameters must be set (thanks to Ian Kahan <kahan@informatik.tu-muenchen.de forsending 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 changeswhen 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 mappedto anonymous connectionsmap to guest = bad user #### DomainsThe following settings only takes effect if 'server role = primaryclassic domain controller', 'server role = backup domain controller'or 'domain logons' is setIt specifies the location of the user'sprofile directory from the client point of view) The followingrequired a [profiles] share to be setup on the samba server (seebelow); 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\profileThe following setting only takes effect if 'domain logons' is setIt specifies the location of a user's home directory (from the clientpoint of view); logon drive = H: logon home = \%N\%UThe following setting only takes effect if 'domain logons' is setIt specifies the script to run during logon. The script must be storedin the [netlogon] shareNOTE: 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 SAMRRPC pipe. The example command creates a user account with a disabled Unixpassword; 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 theSAMR 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 SAMRRPC pipe.; add group script = /usr/sbin/addgroup --force-badname %g ###### MiscUsing the following line enables you to customise your configurationon a per machine basis. The %m gets replaced with the netbios nameof the machine that is connecting; include = /home/samba/etc/smb.conf.%m Some defaults for winbind (make sure you're not using the rangesfor 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 folderswith the net usershare command.Maximum number of usershare. 0 means that usershare is disabled.usershare max shares = 100Allow users who've been granted usershare privileges to createpublic shares, not just authenticated onesusershare 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 eachuser's home directory as \server\username;[homes] ; comment = Home Directories ; browseable = yes By default, the home directories are exported read-only. Change thenext 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 tocreate 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 tocreate dirs. with group=rw permissions, set next parameter to 0775.; directory mask = 0700 By default, \server\username shares can be connected to by anyonewith access to the samba server.Un-comment the following parameter to make sure that only "username"can connect to \server\usernameThis 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 storeusers 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 theirprofile 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 downloadableprinter 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 youradmin users are members of.Please note that you also need to set appropriate Unix permissionsto the drivers directory for these users to have write rights in it; write list = root, @lpadmin /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 /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 Domanda: le directory "Desktop-win" e "HDdiscoF" hanno stessi permessi? Risposta: Non so se sia giusto. con Ubuntu funzionava, con Lubuntu no ???
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 Posso montare tutto, tranne gli hard disk esterni, che non sono di sistema, come appunto il disco D :(
Ti riferisci a Windows? Su Windows ho dato i permessi a tutto le directory su ubuntu /media/Desktop-win e /media/HDdiscoF hanno stessi permessi? Questo non lo so. Come si fa a saperlo? stat /media/Desktop-win stat /media/HDdiscoF 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: - 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
sudo chmod 777 /media/HD-F
sudo chown 1000:1001 /media/HD-F 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: - 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) va bene "F" ? al posto di "D" ? p.s. i permessi su windows sono gli stessi tra le dir : Desktop-win e F ? 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 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 Ciao, risolto Ho acceso i pc questa mattina e tutto funziona. Perchè? Comunque funziona Grazie mille per il tuo aiuto
5 su 20
mostra altri 15 commenti
|
Segui questa domanda
Via email:Una volta eseguito l'accesso potrai iscriverti a tutti gli aggiornamenti qui
Via RSS:Basi di markdown
- *corsivo* o __corsivo__
- **grassetto** o __grassetto__
- collegamento:[testo](http://url.com/ "titolo")
- immagine?
- 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:
domanda posta: 14 May '21, 18:25
domanda visualizzata: 799 volte
ultimo aggiornamento: 18 May '21, 05:53
e se metti "D" al posto di "Disco D" ?
Disco D non è nel file fstab. ho modificato la domanda
che vedi da: sudo smbclient -L 192.168.0.....
do_connect: Connection to 192.168.210 failed (Error NT_STATUS_IO_TIMEOUT)
Cosa significa?
devi mettere l'indirizzo IP del P windows
è 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?
192.168.210 non e' un IP valido
devi essere sicuro di quale sia il nome esatto della condivisione
Questo è l'output:
Continua...
segue...
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?
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
c'e' niente di interessante nei log?
/var/log/samba/log.nmbd
/var/log/samba/log.smbd