PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Samba share unter linux mounten mit fstab



Ulli Ivens
09.09.02, 23:42
Ich habe eine Public Area, alle lokalen Benutzer haben Zugriff alle können schreiben und lesen etc. funzt einwandfrei mit Windows XP (Laptop)

Unter Linux geht das auch aber nur root kann share mounten andere user bekommen diese Fehlermeldung. Wohlgemerkt nur beim mounten, beim arbeiten ist es kein problem welcher User da grade dransitzt:


[ivens@spookyslaptop ivens]$ mount /mnt/public/
cannot mount on /mnt/public: Operation not permitted
smbmnt failed: 1
[ivens@spookyslaptop ivens]$

Das ist der fstab Eintrag
//spookyshome/public /mnt/public smbfs fmask=666,dmask=777,user,guest,noauto 0 0

Es wird in keinster weise nach einem Passwort verlangt. Es ist keins gesetzt weil nur lokale Netzwerk-User zugriff auf die Daten haben, das soll auch so sein und bleiben.


Hat jemand eine Idee worn das liegt ?

SirTwist
09.09.02, 23:47
hast dus mal mit smbmount ausprobiert? da kann man auch notfalls passwörter mit über geben.
ich würd für linux intern aber nfs nutzen (bei mir ist das schneller als samba)

mfg SirTwist

Ulli Ivens
10.09.02, 00:01
Original geschrieben von SirTwist

ich würd für linux intern aber nfs nutzen (bei mir ist das schneller als samba)


würde ich auch, aber da samba sowiso laufen muss wegen dem Windows-Client möchte ich da mit Linux auch drauf zugreifen können ohne noch einen extra Server zu konfigurieren !

Bei smbmount habe ich das gleiche Spiel !!

[ivens@spookyslaptop ivens]$ smbmount //spookyshome/mp3 /mnt/disk/
Password:
cannot mount on /mnt/disk: Operation not permitted
smbmnt failed: 1
[ivens@spookyslaptop ivens]$


Als root klappt das jedoch wunderbar (Abfrage nach Passwort einfach mit Enter bestätigt) !

Ulli Ivens
10.09.02, 00:21
So, das habe ich gemacht:




[root@spookyslaptop mnt]# chown ivens:ivens public/
[root@spookyslaptop mnt]# chown ivens:ivens mp3/
[root@spookyslaptop mnt]# ls -la
insgesamt 32
drwxr-xr-x 8 root root 4096 Sep 8 10:39 ./
drwxr-xr-x 18 root root 4096 Sep 9 15:25 ../
drwxrwxr-x 2 root root 4096 Okt 9 1998 cdrom/
drwxrwxr-x 2 root root 4096 Feb 22 2002 disk/
drwxrwxr-x 2 root root 4096 Feb 6 1996 floppy/
drwxrwxrwx 2 ivens ivens 4096 Sep 8 10:39 mp3/
drwxrwxrwx 2 ivens ivens 4096 Sep 8 10:07 public/
drwxrwxrwx 14 root root 4096 Jan 1 1970 windows/
[root@spookyslaptop mnt]# exit
exit

# zum testen ob Fehlermeldungen kommen


[ivens@spookyslaptop ivens]$ mount /mnt/public/
[ivens@spookyslaptop ivens]$ mount /mnt/mp3
[ivens@spookyslaptop ivens]$ umount /mnt/mp3
[ivens@spookyslaptop ivens]$ umount /mnt/public/


# Das ganze jetzt nochmal als root


[ivens@spookyslaptop ivens]$ su
Password:
[root@spookyslaptop ivens]# mount /mnt/public/
[root@spookyslaptop ivens]# mount /mnt/mp3/

[root@spookyslaptop mnt]# ls -la
insgesamt 32
drwxr-xr-x 8 root root 4096 Sep 8 10:39 ./
drwxr-xr-x 18 root root 4096 Sep 9 15:25 ../
drwxrwxr-x 2 root root 4096 Okt 9 1998 cdrom/
drwxrwxr-x 2 root root 4096 Feb 22 2002 disk/
drwxrwxr-x 2 root root 4096 Feb 6 1996 floppy/
drwxrwxrwx 1 root root 4096 Sep 9 16:14 mp3/
drwxrwxrwx 1 root root 4096 Sep 8 13:32 public/
drwxrwxrwx 14 root root 4096 Jan 1 1970 windows/


[root@spookyslaptop mnt]# umount /mnt/public/
[root@spookyslaptop mnt]# umount /mnt/mp3/


[root@spookyslaptop mnt]# ls -la
insgesamt 32
drwxr-xr-x 8 root root 4096 Sep 8 10:39 ./
drwxr-xr-x 18 root root 4096 Sep 9 15:25 ../
drwxrwxr-x 2 root root 4096 Okt 9 1998 cdrom/
drwxrwxr-x 2 root root 4096 Feb 22 2002 disk/
drwxrwxr-x 2 root root 4096 Feb 6 1996 floppy/
drwxrwxrwx 2 ivens ivens 4096 Sep 8 10:39 mp3/
drwxrwxrwx 2 ivens ivens 4096 Sep 8 10:07 public/
drwxrwxrwx 14 root root 4096 Jan 1 1970 windows/



Das klappt so 100% !! :eek: ( sitze ja auch schon seid ein paar Stunden daran :ugly: ;)


Aber diese Frage bleibt noch offen:

Wie kann sich zwischen dem mounten und dem unmounten als root der besitzer und die Gruppe der Verzeichnisse public und mp3 ändern (ist fett markiert). ein chown wurde nicht manuell ausgeführt !

Kann mir das mal jemand erklähren ??