PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : kann Sambabenutzer nicht erzeugen



yasuo
20.03.04, 19:55
moin,

ich habe folgendes Problem:

Ich habe auf meinem Debian Server den Benutzer "fritz" angelegt und möchte dass dieser Benutzer als Windowsclient zugreifen kann.

allerdings schlägt smbpasswd fehl:

smbpasswd fritz
New SMB password:
Retype new SMB password:
Failed to find entry for user fritz.
Failed to modify password entry for user fritz

Der gleiche Versuch mit Webmin "Unix Benutzer zu Samba Benutzern konvertieren" schlägt ebenfalls fehl:


Benutzer konvertieren fehlgeschlagen : tdb_update_sam: Failing to store a SAM_ACCOUNT for [fritz] without a primary group RID

weiß jemand Rat?

uTaNG
21.03.04, 10:30
Versuch das mal soooo rum... :

Du musst mit smbpasswd den User anlegen,den es in Windows gibt und der von Windows aus auf das share zugreifen möchte. Das setzt aber vorraus das dieser User bereits ein Konto auf deier Linux kiste hat. :)

Folgendes Szenario:

Der Windows-XP-User hannes möchte auf ein Share des Samba Server zugreifen.

1. Auf der Linuxkiste vom Samba Server musst du den User hannes anlegen.
2. Wenn dann hannes exisitert,dann musst du den User nur noch in die Samba Datenbank bekommen und zwar folgender Masen:

smbpasswd -a hannes

so ich hoffe du kommst weiter, mit webmin kenn ich mich nicht aus... :D

yasuo
26.03.04, 14:29
jo eigentlich kenn ich mich mit webmin auch nicht aus, hab es aber benutzt da ich mit der smb.conf schon ganz gut zurechtkomme und dachte ich weiß was ich tue.
Ob das nun mit webmin zusammenhängt weiß ich nicht das Userproblem ist ja ebenso in der Konsole,

ich habe deinen Rat befolgt:



Festplatte:# useradd fritz
Festplatte:# usermod -g users -d /home/fritz/ fritz
Festplatte:# smbpasswd -a fritz
New SMB password:
Retype new SMB password:
tdb_update_sam: Failing to store a SAM_ACCOUNT for [fritz] without a primary group RID
Failed to add entry for user fritz.
Failed to modify password entry for user fritz


die Meldung bekomme ich jetzt wie gesagt immer wenn ich einen neuen User anlegen möchte :/

uTaNG
26.03.04, 15:03
hmm ... mach mal folgendes...

erstmal alles weg:


#userdel -r fritz
#smbpasswd -x fritz


nun erstellen wir alles neu:


#useradd fritz -m -G users
#passwd fritz
#smbpasswd -a fritz


Du kannst dem user auch eine shell geben,dann musst du aber bei "useradd" noch ein "-s /bin/bash" dranhängen...

So versuch das ganze mal... :)

yasuo
27.03.04, 09:45
danke für den TIpp aber leider funzt es imemr noch nicht :(



# userdel -r fritz
# smbpasswd -x fritz
Failed to initialise SAM_ACCOUNT for user fritz.
Failed to modify password entry for user fritz

# useradd fritz -m -G users
# passwd fritz
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully

# smbpasswd -a fritz
New SMB password:
Retype new SMB password:
tdb_update_sam: Failing to store a SAM_ACCOUNT for [fritz] without a primary group RID
Failed to add entry for user fritz.
Failed to modify password entry for user fritz

uTaNG
27.03.04, 12:30
das kriegen wir schon hin,keine sorge ;)

a) was hast du den für eine Samba Version ?
b) Könntest du mal bitte deine smb.conf posten...

bis dahin überleg ich mal ... :D

yasuo
27.03.04, 15:27
also ich hab das System erst kürzlich aufgesetzt.

smbd --version
Version 3.0.2a-Debian



#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# 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 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 commentary 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 many any basic syntactic
# errors.
#

#======================= Global Settings =======================

[global]
log file = /var/log/samba/log.%m
passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n .
obey pam restrictions = yes
socket options = TCP_NODELAY
write list = heinz
force directory mode = 777
force group = users
encrypt passwords = true
public = yes
passdb backend = tdbsam guest
passwd program = /usr/bin/passwd %u
dns proxy = no
netbios name = festplatte
wide links = no
server string = %h server (Samba %v)
invalid users = root
force create mode = 666
workgroup = lan
force user = nobody
os level = 20
security = share
syslog = 0
panic action = /usr/share/samba/panic-action %d
max log size = 1000

[homes]
comment = Home Directories
browseable = no

# 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 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

# 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

[printers]
comment = All Printers
browseable = no
path = /tmp
printable = yes
public = no
writable = no
create mode = 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 = no

# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom


[anime]
comment = Anime - nur Lesen
path = /daten/anime/anime
write list = heinz

[x_anime]
comment = Austausch Anime
writeable = yes
create mode = 666
path = /daten/anime/anime/austausch_anime
directory mode = 777

uTaNG
27.03.04, 16:04
hmm...

ändere das mal folgender massen ab:



[global]
...
passdb backend = smbpasswd, tdbsam
...

und machst ein :


/opt/local/samba/bin/smbpasswd -a -m fritz

und dann änderst du die Zeile wieder:



passdb backend = tdbsam, smbpasswd

yasuo
27.03.04, 16:41
das hab ich jetzt nicht ganz verstanden,

also bei mir steht derzeit


passdb backend = tdbsam guest

das soll ich ändern in

passdb backend = smbpasswd, tdbsam

und dann den Befehl ausführen

smbpasswd -a -m fritz
Failed to initialise SAM_ACCOUNT for user fritz$.
Failed to modify password entry for user fritz$
[code]

danach "wieder" ändern in
[code] passdb backend = tdbsam, smbpasswd
bei mir war es aber nicht "passdb backend = tdbsam, smbpasswd" und ich bekomme ja auch eine Fehlermeldung.

sind das Configdateien oder Programme die da angegeben sind?

RichieX
28.03.04, 11:43
Tschuldigung, wenn ich hier so reinplatzte, aber smbpasswd sagt doch was ihm nicht passt:



tdb_update_sam: Failing to store a SAM_ACCOUNT for [fritz] without a primary group RID
Failed to add entry for user fritz.
Failed to modify password entry for user fritz


Meiner Meinung nach solltest du so vorgehen:

den Benutzer fritz wieder löschen:

#smbpasswd -x fritz <- hier kann durchaus ein Fehler kommen macht nix.
#userdel fritz

Anlegen einer Gruppe für den Fritz
groupadd smbusers

Die Gruppe auf Samba mappen:
#net groupmap add unixgroup=smbusers type=domain ntgroup="Domain-Users"

Anlegen des Benutzers:
#useradd -s /bin/false -d /home/fritz -g smbusers fritz

Hinzufügen als Samba-Benutzer:
#smbpasswd -a fritz

Viel Spaß
RichieX

uTaNG
28.03.04, 23:52
In dem Zusammenhang kannnst du dir ja noch mal das durchlesen,dannach müsste alles gehen...

http://www.samba.org/samba/docs/man/groupmapping.html :D