Précédent   Forum des professionnels en informatique > Systèmes > Linux > Distributions > Ubuntu
Ubuntu Vos questions sur les distributions Ubuntu et dérivées (Kubuntu, Xubuntu... )
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 30/08/2006, 10h11   #1
Membre à l'essai
 
Inscription : juillet 2005
Messages : 96
Détails du profil
Informations forums :
Inscription : juillet 2005
Messages : 96
Points : 24
Points : 24
Par défaut [UBUNTU] Comment appliquer le partage de fichiers avec mon Windows

Bonjour tout le monde!!

J'ai installé dernièrement ubuntu sur mon pc portable et je l'ai mis en réseau avec un pc windows xp sp2(partition ntfs).

Je rencontre actuellement le problème suivant: j'arrive a récupérer des fichiers qui se trouvent sur le pc windows mais quand je suis sous mon windows et que je veux récupérer un fichier sur mon ubuntu j'ai accès au dossier partagé, je vois les fichiers partagés mais je ne peux pas copier ceux ci j'ai un message d'erreur accès refusé vérifier si le fichier n'est pas utilisé ou en lecture seule.

Que puis je faire?

ps: dans [globals] j'ai security = share
mon dossier partagé est /home/altadeos/partage/
j'ai fait la commande chmod 777 /home/altadeos/partage/ mais je ne sais passi ça a fonctionné

Merci d'avance pour vos réponses!!
altadeos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/08/2006, 10h22   #2
Membre émérite
 
Avatar de FloMo
 
Inscription : juillet 2004
Messages : 713
Détails du profil
Informations forums :
Inscription : juillet 2004
Messages : 713
Points : 897
Points : 897
Par défaut Partage Samba

Pour configurer Samba, édite le fichier /etc/samba/smb.conf et vérifie que ton partage possède les éléments suivants :
- browseable = yes ;
- writable = yes ;
- guest ok = yes ;
- public = yes ;
- read only = no.

Bien sûr, tous ces éléments ne sont pas forcément nécessaires. Lit la doc pour plus d'infos. Cependant, si tu mets tout comme ça et que le WORKGROUP correspond, ça devrait fonctionner. N'oublies pas de redémarrer le démon Samba près la modification de la configuration.

Pour ce qui est du format de ta partition, ça ne change rien. Tout se fait au niveau du réseau.

Bon courage pour la suite.
FloMo est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/08/2006, 10h30   #3
Membre à l'essai
 
Inscription : juillet 2005
Messages : 96
Détails du profil
Informations forums :
Inscription : juillet 2005
Messages : 96
Points : 24
Points : 24
Bonjour et merci de la réponse!!

J'ai déjà essayé avec ces paramètres mais la copie est impossible je ne comprends vraiment pas.

voici mon smb.conf:

Code :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
[global]
 
## Browsing/Identification ###
# Change this to the workgroup/NT-domain name your Samba server will part of
# server string is the equivalent of the NT Description field
workgroup = MSHOME
 
 
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
   wins support = no
 
 
# 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
 
# What naming service and in what order should we use to resolve host names
# to IP addresses
;   name resolve order = lmhosts host wins bcast
 
#### 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 = true
 
 
 
#### Debugging/Accounting ####
 
# This tells Samba to use a separate log file for each machine
# that connects
log file = /var/log/samba/log.%m
 
# Put a capping on the size of the log files (in Kb).
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 #######
 
# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba-HOWTO-Collection/ServerType.html 
# in the samba-doc package for details.
;   security = user
security = share
 
# You may wish to use password encryption.  See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
encrypt passwords = true
 
# 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
 
;   guest account = nobody
invalid users = root
 
# 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 = no
 
# 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\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\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 = no
 
########## Domains ###########
 
# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
;   domain logons = yes
#
# The following setting only takes effect if '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
;   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 
 
########## Printing ##########
 
# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
;   load printers = yes
 
# lpr(ng) printing. You may wish to override the location of the
# printcap file
;   printing = bsd
;   printcap name = /etc/printcap
 
# CUPS printing.  See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
;   printing = cups
;   printcap name = cups
 
# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
;   printer admin = @lpadmin
 
printcap name = cups
disable spools = Yes
show add printer wizard = No
printing = cups
 
############ 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 
 
# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/speed.html
# for details
# You may want to add the following on a Linux system:
#         SO_RCVBUF=8192 SO_SNDBUF=8192 
socket options = TCP_NODELAY
restrict anonymous = no
 
 
 
 
# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba. 
;   message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &
 
# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended. 
   domain master = no
 
preferred master = yes
os level = 65
max protocol = NT
ldap ssl = No
server signing = Auto
 
# 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
 
#======================= 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 = no
 
# 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
;   valid users = %S
 
# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
;   writable = no
 
# File creation mask is set to 0600 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0664.
;   create mask = 0600
 
# 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
 
# 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
;   writable = no
;   share modes = no
 
# 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
 
server string = %h (Samba, Ubuntu Dapper Drake 6.06.1)
 
[print$]
    path = /var/lib/samba/printers
    browseable = yes
    guest ok = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775
 
[printers]
comment = All Printers
    path = /tmp
    printable = yes
    guest ok = yes
    browseable = no
 
[partage]
path = /home/altadeos/partage/
comment = Partition de partage entre Ubuntu et Windows
read only = No
guest ok = Yes
browseable = yes 
writable = yes 
public = yes
y a t'il quelquechose qui cloche?

Merci d'avance pour vos réponses.
altadeos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/08/2006, 18h41   #4
Rédacteur/Modérateur
 
Avatar de gorgonite
 
Homme Nicolas Vallée
Ingénieur Système
Inscription : décembre 2005
Messages : 9 774
Détails du profil
Informations personnelles :
Nom : Homme Nicolas Vallée
Âge : 27
Localisation : France

Informations professionnelles :
Activité : Ingénieur Système
Secteur : Transports

Informations forums :
Inscription : décembre 2005
Messages : 9 774
Points : 14 303
Points : 14 303
t'aurais pas oublié d'autoriser les connexions de ta zone locale ?
__________________
Evitez les MP pour les questions techniques... il y a des forums
Contributions sur DVP : Mes Tutos | Mon Blog
gorgonite est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/08/2006, 23h34   #5
Membre à l'essai
 
Inscription : juillet 2005
Messages : 96
Détails du profil
Informations forums :
Inscription : juillet 2005
Messages : 96
Points : 24
Points : 24
merci de nouveau pour vos réponse!!

Je ne comprends pas trop ce que tu veux dire
altadeos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/08/2006, 23h47   #6
Membre à l'essai
 
Inscription : juillet 2005
Messages : 96
Détails du profil
Informations forums :
Inscription : juillet 2005
Messages : 96
Points : 24
Points : 24
J'ai enfin réussi c'est bisarre les fichiers que je créaient n'avaient pas la permission pour les users c'est donc pour ça que ça ne fonctionnait pas sinon mon répertoire partage a un chmod 777 y a t'il une manip a faire pour que chaque fichier qui se trouve à l'intérieur dispose de ce chmod?

Merci d'avance pour vos réponses
altadeos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/08/2006, 10h55   #7
Membre chevronné
 
Avatar de Spoutnik
 
Homme
Inscription : octobre 2003
Messages : 668
Détails du profil
Informations personnelles :
Sexe : Homme
Âge : 32
Localisation : Etats-Unis

Informations forums :
Inscription : octobre 2003
Messages : 668
Points : 746
Points : 746
Citation:
Envoyé par altadeos
y a t'il une manip a faire pour que chaque fichier qui se trouve à l'intérieur dispose de ce chmod?
Oui, appliquer ton chmod aux fils de ton répertoire partagé. C'est à dire un chmod récurssif avec l'option -R
chmod -R 777 /mon/repertoire/partage
__________________
Two beer or not two beer. (Shakesbeer)
Question technique par MP => poubelle!
Spoutnik est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/08/2006, 14h42   #8
Membre à l'essai
 
Inscription : juillet 2005
Messages : 96
Détails du profil
Informations forums :
Inscription : juillet 2005
Messages : 96
Points : 24
Points : 24
Bonjour et merci des réponses pour le chmod -r ça fonctionne et ça m'a grandement aidé!!

Je finirais par vous demander comment obtenir les codes des différents chmod car je ne vais surement pas laisser le chmod 777 car il autorise trop de droits
je pense que le répertoire de partage sera pour mon utilisateur local tous les droits et l'utilisateur qui accède en réseau en lecture. a moins de mettre en lecture seule dans le smb.conf?

Merci d'avance pour vos réponses je pense que je vais faire un tutorial par la suite pour l'intégrer à la faq linux si ça intéresse quelqu'un.
altadeos est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 31/08/2006, 14h54   #9
Membre éprouvé
 
Avatar de chrifo
 
Inscription : juillet 2006
Messages : 445
Détails du profil
Informations forums :
Inscription : juillet 2006
Messages : 445
Points : 418
Points : 418
Il existe nombre de docs bien meilleures, mais en bref (et sans parler de sticky) :
3 chiffres dans ton chmod : le premier pour le propriétaire (u), le deuxieme pour le groupe (g) et le troisieme pour les autres (o).

pour chaque chiffres, 3 bits : lecture (r), ecriture (w) et execution (x). par ex pour trouver le 7, ça te fait r=1, w=1 et x=1, soit "111", ce qui en décimal donne 1*4+1*2+1*1 = 7

par ex, pour donner tous les droits au proprietaire, seulement la lecture et l'execution au groupe et rien aux autres, ça donne : chmod 750
chrifo est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité Cette discussion est résolue.
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 10h16.


 
 
 
 
Partenaires

Hébergement Web