PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Samba, ganz kurz



Malekith
29.05.02, 20:13
Habe einen Samba Server konfiguriert.
Größere Sicherheit ist nicht von nöten, es soll auf diesen Rechner von WinXP aus zugegriffen werden. Die Freigabe taucht in der Netzwerkumgebung auf und wenn man aber draufklickt, frägt er nach einem Passwort... Das sollte er aber nicht, er sollte sofort den Ordner öffnen.

Jemand eine Idee.

Das ist die Config:

#
# /etc/samba/smb.conf ist the main samba configuration file. Cf. the
# manual page of smb.conf and the included documantation in
# /usr/share/doc/packages/samba in order to understand the options
# listed here and many more features.
#
# Lines in this example which starts with ; and # are ignored comment
# ones. # indicates a comment and ; a deactivated example line.
#
# We suggest to use the
command 'testparm' after any changes you made.
#
# Copyright (c) 1999 - 2001 SuSE GmbH Nuernberg, Germany.
#
# Please send bugfixes or comments to feedback@suse.de.
#

[global]
workgroup = Avalon-Coop


s level = 2
keep alive = 30


encrypt passwords = Yes
kernel oplocks = false
guest account = nobody
map to guest = Bad User
# This tells samba to use the file smbusers for user mapping.
; username map = /etc/samba/smbusers

# This tells samba to write log files per machine.
; log file = /var/log/samba/%m
# This sets an alternate log level. Default is 2.
; log level = 3

# Uncomment the following, if you want to use an existing NT-Server to
# authenticate users, but don't forget that you also have to create them
# locally!
; security = server
; password server = 192.168.1.10

printing = LPRNG
printcap name = /etc/printcap
load printers = Yes

# These settings are a suggestion for a local network. Cf. section
# 'socket options' in the man page of smb.conf and socket(7).
socket options = SO_KEEPALIVE IPTOS_LOWDELAY TCP_NODELAY

# Uncomment this, if you want to integrate your server
# into an existing net e.g. with NT-WS to prevent nettraffic
; local master = No

# Please uncomment the following entry and replace the ip number and
# netmask with the values of your network interface configuration.
; interfaces = 192.168.1.1/255.255.255.0

# If you want Samba to act as a wins server, please set
# 'wins support' to yes.
wins support = No

# If you want Samba to use an existing wins server, please uncomment the
# following line and replace the dummy with the wins server's ip number.
; wins server = 192.168.1.1

# Set these two parameters to your DOS code page and appropriate UNIX
# character set. These values are for west European languages (Latin-9)
# UNIX character and MS-DOS Latin 1 code page.
character set = ISO8859-15
client code page = 850

# This is a simple measure against Nimba Worm. Cf. README.Win32-Viruses
veto files = /*.eml/*.nws/riched20.dll/*.{*}/

# Do you wan't samba to act as a logon-server for your windows 95/98
# clients, so uncomment the following:
; domain logons = Yes
; domain master = Yes
# For a specific logon script per user
; logon script = %U.bat
# For a specific logon script per machine
; logon script = %m.bat

# Where to store the logon scripts.
;[netlogon]
; comment = Network Logon Service
; path = /var/lib/samba/netlogon

# Where profiles of Windows 9x systems are stored.
# First example for a centralized place.
; logon home = \\%L\profiles\%U
# Second example for a subdirectory of the users home.
; logon home = \\%L\%U\profile
# Where profiles of Windows NT systems are stored.
; logon path = \\%L\profiles\%U

# Extra share for profiles. Default is the home of the user.
;[profiles]
; comment = Network Profiles Service
; path = /var/lib/samba/profiles
; browseable = No

[homes]
comment = Home Directories
read only = No
create mask = 0640
directory mask = 0750
browseable = No
puplic = yes

[Shared]
comment = Linux rulez
path = /windows/E
read only = No
create mode = 750
puplic = yes
browsable = yes

[Shared_alt]
comment = Alternative Freigabe
read only = yes
path = /home/marcel
create mode = 0750
puplic = yes

# The following share gives all users access to the Server's CD drive,
# assuming it is mounted under /media/cdrom. To enable this share,
# please remove the semicolons before the lines
[cdrom]
comment = Linux CD-ROM
path = /media/cdrom
locking = No

;[printers]
; comment = All Printers
; path = /var/tmp
; create mask = 0600
; printable = Yes
; browseable = No

Vielen Dank im Vorraus,
Malekith

Newbie2001
29.05.02, 20:22
auf der Linux Kiste mit

useradd -a XPUsername

den Xp User hinzufügen (gleiche Schreibung wie auf dem Xp-Rechner beachten), danach mit

smbpasswd -a XPUsername

den User zur Samba-Userliste hinzufügen und mit

smbpasswd -e XPUsername

den User aktivieren.

Malekith
29.05.02, 21:12
useradd -a XPUsername => useradd: Ungültige Option -- »a«

Wenn ich nur
Avalon:/etc/samba # smbpasswd -a nutzer schreib kommt:

Unknown parameter encountered: "s level"
Ignoring unknown parameter "s level"
New SMB password:
Retype new SMB password:
Mismatch - password unchanged.
Unable to get new password.
Avalon:/etc/samba #

Was währe denn wenn ich auf eine größere LAN gehe (70Mann) und meine Freigabe allen zur verfügung stellen wollte?

Malekith

Newbie2001
29.05.02, 21:29
dann probier mal nur useradd nutzer. bei einem größeren lan hast du ziemlich viel zu tun. die einfachste aber mit sicherheit auch unsicherste methode, wäre wenn du guest login = yes machst un den guest-user auf root setzt. dann kann sich jeder ohne username und passwort einloggen und hat trotzdem schreibrechte. das is aber nur eine äußerste notlösung, und eigentlich ne richtige ****** idee, aber es klappt.

xstevex22
29.05.02, 21:32
Hi,
also, in der smb.conf

security = user

setzen, dann mit

# useradd -s /bin/false XPUsername

den Windows XP Benutzer anlegen. Danach mittels

# smbpasswd -a XPUsername

den Samba-Benutzer anlegen.
Ebenso mittels

# useradd -s /bin/false -d /dev/null Rechnername$

ein Computerkonto erstellen, wobei Rechnername der Netbios-Name deines XP-Recher's ist. Das $ am Ende beachten.
Das Computerkonto aktivieren mit

# smbpasswd -a -m Rechnername

diesmal ohne $.
Eine Anleitung findest du hier (http://steve.stuetzpunkt.de/showrep.php?bericht=Samba_PDC).

Newbie2001
29.05.02, 21:45
Maschienenaccounts werden doch nur benötigt, falls man eine domain anlegen möchte. für normalen sambva-zugriff sollte
useradd user
smbpasswd -a user
smbpasswd -e user
genügen. du musst beachten, dass die schreibweise des benutzernamens, genauso sein muss wie unter win. das passwort muss auch das gleiche sein.

xstevex22
30.05.02, 14:07
Hi,
richtig. Der Maschinenaccount wird nur bei Domänen gebraucht. Mein Fehler.

Malekith
04.06.02, 18:27
Hallo,

danke für die Tips! Jetzt kann ich von WinXP aus zugreifen! Aber wie jetzt bei WinME (Ein Freund von mir muss ME wiederwillen nutzten weil sonst die Graka nicht geht :D ). Der frägt ja nur nach einem Kennwort.

@Newbie 2001
Kann ich den Guestuser auch auf meinen Nutzernamen setzten, oder auf einen Nutzernamen mit sehr eingeschränkten Rechten?

Malekith

ramon
10.06.02, 14:13
Hi Leute,

genau an dem Punkt bin ich jetzt, wenn ich von ME aus zugreifen will fragt er nach nem passwort und das blöde ist, da gibts ein prob, daß er das passwort dann nicht akzeptiert, oder den user nicht kennt oder ...
weis jemand rat ?

Trazom
11.06.02, 22:12
Moin zusammen....

Ich hab so ziemlich dieselben Probleme. Wenn XP auf meinen Samba-Server zugreifen will, verlangt dieser nach einem (mir unbekannten) Passwort. Ich bin unter XP aber exakt mit denselben Daten eingeloggt, wie es sie auch unter Linux gibt, ich sehe ja auch mein Homeverzeichnis. Das sieht dann so aus:
http://www.dastrazom.de/img/samba1.jpg

Ich habe Samba 2.0.6 und Suse 6.4 (sorry, bin Linux-Newbie und Samba war in dieser Version dabei und ich hab sowas auch noch nie selbst kompiliert und installiert. Das 6.4 hat mir jemand geschenkt, der nichts damit anfangen konnte :D ).

Das Problem ist zusätzlich, dass ich nicht jeden Rechner im Netz als User eintragen will. Das liegt daran, dass ich öfter LANs mit vielen Leuten veranstalte, die die verschiedensten Windows-Versionen nutzen, Win98, WinME, Win2000 und, wie ich, WinXP.

Falls es hilft, habt Ihr hier nochmal meine smb.conf:

;
; /etc/smb.conf
;
; Copyright (c) 1999 SuSE GmbH Nuernberg, Germany.
;
[global]
workgroup = Irrenhaus
printcap name = /etc/printcap
guest account = nobody
socket options = TCP_NODELAY
keep alive = 30
load printers = yes
security = share
map to guest = Bad User
os level = 2
printing = bsd
kernel oplocks = false

[homes]
comment = Heimatverzeichnis
browseable = no
read only = no
create mode = 0750

; The following share gives all users access to the Server's CD drive,
; assuming it is mounted under /cd. To enable this share, please remove
; the semicolons before the lines
;
; [cdrom]
; comment = Linux CD-ROM
; path = /cd
; read only = yes
; locking = no

[printers]
comment = All Printers
browseable = no
printable = yes
public = no
read only = yes
create mode = 0700
directory = /tmp


Ich hoffe, es kann mir geholfen werden.
Gruß, Trazom

ml
11.06.02, 22:19
Schreib mal in den [global] - Abschnitt

encrypt passwords = yes rein!

Hab auch meine smb.conf angehängt, die funzt bei mir einwandfrei!

Malekith
11.06.02, 22:22
Wie funzt denn die Config?
Kann man damit folgendes:

Ordner freigeben, den jeder ohne Passwort einsehen kann und Dateien davon kopieren, und das über Windoofnetzwerkumgebung?

Malekith

ml
11.06.02, 22:27
z.B.:

[public]
path = /Eigene_Dateien
read list = guest,markus,@users
writable = no
valid users = guest,root,gast,markus,@root,@users,@markus
comment = tux an erde
browseable = yes
user = guest,root,markus

die Rechte müssen so gesetzt werden, dass jeder lesen kann.

z.B.: mit chmod +r -R /verzeichnis_das_jeder_lesen_darf

Trazom
11.06.02, 22:39
Original geschrieben von ml
Schreib mal in den [global] - Abschnitt

encrypt passwords = yes rein!

Hab auch meine smb.conf angehängt, die funzt bei mir einwandfrei!

der eintrag hat leider nichts gebracht...

zum post über mir:
wofür dienen der user und valid user eintrag?
wie gesagt möchte ich nicht jeden user des netzes eintragen, da diese immer wechseln.

Alx
13.06.02, 12:46
hi,

kenn mich zwar auch noch nicht aus, aber ich hab ähnliche situation wie du:

mehrere workstations mit win 95, 98, nt, 2000 und hab auf einem linux sever ein fileshare eingerichtet, auf das jeder zugiff hat.

die eintrage in der samba conf. sehen so aus:


[global]
workgroup = LINUX
netbios name = TEST-SERVER
security = SHARE
encrypt passwords = Yes
update encrypted = Yes
os level = 64
hosts allow = xxx.xxx.xxx. (die ip's vom netzt)

[test]
comment = for testing only
path = /export/samba/test
read only = No
guest ok = Yes

[printers]
path = /tmp
guest ok = Yes
printable = Yes
browseable = No
available = No

[Phyto_Kopp]
comment = y2prn_Phyto_Kopp.upp--auto-Phyto_Kopp
path = /tmp
read only = No
guest ok = Yes
printable = Yes
printer name = Phyto_Kopp
oplocks = No
share modes = No


außerdem verwende ich auch noch einen netzt printer (ohne pw, anmeldung usw..)

evtl. hilft das ja

lg
alex

Trazom
13.06.02, 12:49
Ich habs jetz hinbekommen.

Nach dem Eintrag von "encrypt passwords = yes" konnte ich in Webmin die Linux-user zu samba-usern konvertieren (keine ahnung wie man das sonst macht) und es funzt jetzt alles. Nochmal Danke.

2 Fragen hab ich noch:

1. Auf welchem Port läuft smb?
2. Welche Konfigurationsdateien gehören alle zu Samba?

xstevex22
13.06.02, 15:12
Hi,
Samba benutzt die Ports 137-139, guck mal in /etc/services.
Die Konfigurations-Datei ist die smb.conf, liegt meist unter /etc/samba/