PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Samba Freigabe Problem



babbAZwack
01.02.06, 18:11
Hallo,

folgendes Problem:

Ich habe Debian 3.1r1 Sarge und Samba 3.0.20a.

Auf dem Samba-Server habe ich 2 Benutzer eingerichten:
User1 und User2.
Nun moechte ich, dass wenn sich User 1 verbindet lediglich den Share1 sieht und darauf zugreifen kann (rw).
User2 hingegen soll Share1 und Share2 sehen und darauf zugreifen koennen (rw).

Ist das moeglich, und wenn ja, wie?

Danke fuer die Hilfe

bAbbA

fcczj
02.02.06, 07:40
valid users = user1, user2 .... einfach zu der Sharedeklaration hinzufügen

babbAZwack
02.02.06, 10:51
hab ich schon gehabt. hier meine smb.conf:

#
# 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
encrypt passwords = true
public = yes
passwd program = /usr/bin/passwd %u
passdb backend = tdbsam guest
dns proxy = no
writeable = yes
server string = %h server
invalid users = root
workgroup = HOMELAN
security = user
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

[musik]
path = /media/musik
read only = no
valid users = Administrator
force user = root
guest ok = no
public = no
writeable = yes

[Programme]
path = /media/downloading/downloaded/Programme
read only = no
valid users = vatter
force user = root
guest ok = no
public = no
writeable = yes

[rips1]
path = /media/rips1
read only = no
valid users = Administrator
force user = root
guest ok = no
public = no
writeable = yes

[rips2]
path = /media/rips2
read only = no
valid users = Administrator
force user = root
guest ok = no
public = no
writeable = yes

[downloading]
path = /media/downloading
read only = no
valid users = Administrator
force user = root
guest ok = no
public = no
writeable = yes

babbAZwack
02.02.06, 15:13
das problem ist, das der andere user die shares immernoch sieht. er kann zwar nicht drauf zugreifen, aber er sieht sie. Informationen die er nicht sehen soll!!!

emba
02.02.06, 19:42
browseable = no

greez

babbAZwack
03.02.06, 20:18
hi, hab ich gerade ausprobiert. dann sieht keiner mehr die Verzeichnisse. auch Administrator nicht. Der soll sie aber noch sehen im Gegensatz zum user vatter.

Also vatter soll quasi nur Programme sehen, wenn er auf den server zugreift.
Admin hingegen soll alles bis auf Programme sehen, wenn er auf den server zugreift.

emba
04.02.06, 15:29
shares koennen nicht pro user sichtbar gemacht werden
ich weiss auch nicht, warum dass ein prob ist, denn du kannst den zugriff ja immer mit valid users beschraenken

greez

babbAZwack
05.02.06, 11:00
ich find's einfach eleganter, wenn der nicht-admin-user nur die sachen sieht die er auch sehen soll :p

Aber wenn das nicht geht, hab ich wohl pech gehabt :ugly:

emba
05.02.06, 13:47
was mir gerade einfaellt

bitte probier mal, eine smb.conf mittels includes zu gestalten

in etwa so



[global]

<deine allgemeinen einstellungen hier>

inlcude /etc/samba/smb.conf.%u

[homes]
...


dann pro nutzer eine smb.conf namens smb.conf.<username> anlegen und darin nur shares definieren, die fuer den jeweiligen nutzer gelten (kannst du sicherlich auch gruppenspezifisch machen, mehr dazu in man smb.conf unter dem punkt variable expansion)

greez