PDA

Bekijk de volledige versie : Samba2: SWAT-Einstellungen



plan4b
23-08-2007, 00:06
Hallo,

nach der Installation von Samba2 (mit Wengis tollem Tutorial) komme ich nicht auf das Browserinterface (http://192.168.1.1:901/).

in der SWAT habe ich folgendes stehen:


asus@(none) ipkg]$ vi /opt/etc/xinetd.d/swat
service swat
{
port = 901
socket_type = stream
wait = no
only_from = localhost 192.168.1.190 192.168.1.1/300
user = admin
server = /opt/sbin/swat
log_on_failure += USERID
disable = No


Ich vermute der IP-Bereich ist nicht richtig eingestellt. Die mir vom Router zugewiesene IP ist 192.168.1.190
(Liege ich richtig mit der Vermutung, dass X.X.X.1/300 den Bereich von 1 bis 300 beinhaltet?)

In meiner Netzwerkumgebung ist Samba zu sehen. In der ipkg ist Samba auch zu sehen: samba2 - 2.2.12-1

Übrigens finde ich cron bei mir nicht:

[asus@(none) root]$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:01 /sbin/init
2 ? S 0:00 [keventd]
3 ? RN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
59 ? S 0:00 telnetd
169 pts/0 Ss 0:00 \_ -sh
174 pts/0 R+ 0:00 \_ ps axf
64 ? S 0:00 httpd vlan1
69 ? S 0:00 klogd
70 ? S 0:00 syslogd -m 0 -O /tmp/syslog.log -S -l 7
75 ? S 0:00 dnsmasq
77 ? S 0:00 [khubd]
86 ? Ss 0:00 lpd
88 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
91 ? Ss 0:00 waveservermain
93 ? Ss 0:00 rcamdmain
97 ? S 0:00 [usb-storage-0]
98 ? S 0:00 [scsi_eh_0]
102 ? Ss 0:00 infosvr br0
104 ? Ss 0:02 watchdog
107 ? Ss 0:00 \_ ntp
116 ? S 0:00 dropbear
117 ? S 0:00 [kjournald]
121 ? S 0:00 [kjournald]
123 ? S 0:00 [kjournald]
147 ? S 0:00 udhcpc -i vlan1 -p /var/run/udhcpc0.pid -s /tmp/udhcp
153 ? Ss 0:00 /opt/sbin/smbd -D
155 ? Ss 0:00 /opt/sbin/nmbd -D
160 ? S 0:00 stupid-ftpd
167 ? S 0:00 upnp -D -L br0 -W vlan1


Hängt das zusammen? Denke nicht.

Ich bemühe mich redlich und haue mir lesender- und probierenderweise die Nächte um die Ohren...

Hat einer eine Idee?

Chrissi

MrMagix
23-08-2007, 04:13
Hi Plan4b,
die Zeile

"only_from = localhost 192.168.1.190 192.168.1.1/300"

kann so nicht stimmen. Mit dem Parameter sagst Du, wer SWAT ansprechen darf. lass die 192.168.1.1/300 einfach weg. Dann kannst Du nur vom router aus (localhost) und deinem Rechner (192.168.1.190) auf SWAT zugreifen. Willst Du das gesamte Netz von 192.168.1.1 bis 192.168.1.254 auf SWAT zugreifen lassen, sollte der eintrag etwa so aussehen 192.168.1.0/24.


Btw.: Die Notation /24 ist die sogeannte Subnetzwerkmaske und ist in dem Fall ewas kürzer als 255.255.255.0 -> http://de.wikipedia.org/wiki/Netzmaske

Zum Thema Cron - den Dienst siehst Du auch nicht in der Prozessliste. Ist Komisch, ist aber so.

Hoffe das hat dir schon geholfen.

MrMagix.

wengi
23-08-2007, 06:44
Zum Thema Cron - den Dienst siehst Du auch nicht in der Prozessliste. Ist Komisch, ist aber so.

Einspruch, Euer Ehren!

[admin@blechbuechse root]$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:04 /sbin/init
2 ? S 0:00 [keventd]
3 ? SN 5:11 [ksoftirqd_CPU0]
4 ? S 4:11 [kswapd]
5 ? S 0:00
6 ? S 0:00 [kupdated]
7 ? S 0:39 [mtdblockd]
43 ? S 0:00 telnetd
47 ? S 1:45 httpd
52 ? S 0:00 klogd
54 ? S 0:00 [khubd]
69 ? S 0:00 /usr/sbin/portmap
71 ? S 0:00 [nfsd]
73 ? S 0:00 [lockd]
74 ? S 0:00 \_ [rpciod]
75 ? Ss 0:00 /usr/sbin/mountd
78 ? Ss 10:56 watchdog
80 ? Ss 0:00 \_ ntp
90 ? S 1:27 dropbear
12918 ? Ss 0:02 \_ dropbear
12919 pts/0 Ss 0:01 \_ -sh
12922 pts/0 R+ 0:00 \_ ps axf
92 ? S 0:01 [kjournald]
107 ? S 0:26 [kjournald]
137 ? S 6:33 /sbin/syslogd -m 0 -O /opt/var/log/messages -S -l 7
149 ? Ss 0:00 /opt/sbin/xinetd
161 ? Ss 5:17 \_ nmbd
160 ? S 0:08 /usr/sbin/busybox_httpd -c /opt/etc/httpd.conf -p 8008 -h /opt/share/www
[B] 5098 ? Ss 0:02 /opt/sbin/cron
8678 ? Ss 0:09 transmissiond -p 65534 -w 300 -u 40 -d 400 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
8681 ? S 0:00 \_ transmissiond -p 65534 -w 300 -u 40 -d 400 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
8682 ? S 0:01 \_ transmissiond -p 65534 -w 300 -u 40 -d 400 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
8683 ? S 10:30 \_ transmissiond -p 65534 -w 300 -u 40 -d 400 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
11872 ? S 106:50 \_ transmissiond -p 65534 -w 300 -u 40 -d 400 -i /opt/var/run/transmission.pid /tmp/harddisk/torrent/active-torrents.txt
[admin@blechbuechse root]$

wengi

MrMagix
23-08-2007, 11:40
:eek: Was - oh mann - da hat man den ganzen Tag Prozesslisten vor den Augen und über sieht sowas.

Mr Magix - Ist komisch, ist aber verwirrt. :cool:

plan4b
23-08-2007, 14:02
Hallo & danke für die promte Hilfe.

Es ist wohl doch mehr im Argen mit meinem WL-500g Premium. Ich habe eine 400 GB SATA mit vier Linux Partitionen dranhängen. Ich bin alles durchgegangen und kann den Fehler nicht finden. Vielleicht erkennt ein geübtes Augeschnell, an welcher Schraube gedreht werden muss:



Disk /dev/discs/disc0/disc: 400.0 GB, 400088457216 bytes
255 heads, 63 sectors/track, 48641 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/discs/disc0/part1 1 63 506016 82 Linux swap
/dev/discs/disc0/part2 64 188 1004062+ 83 Linux
/dev/discs/disc0/part3 189 32059 256003807+ c Win95 FAT32 (LBA)
/dev/discs/disc0/part4 32060 48641 133194915 c Win95 FAT32 (LBA)

[asus@(none) root]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 2880 2880 0 100% /
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part2 988244 107192 830852 12% /opt
/dev/discs/disc0/part3 255941248 256 255940992 1% /tmp/harddisk
/dev/discs/disc0/part4 255941248 256 255940992 1% /tmp/harddisk
/dev/discs/disc0/part1 255941248 256 255940992 1% /tmp/harddisk

Die swap ist bereit:

total used free shared buffers cached
Mem: 30116 18028 12088 0 2348 8332
-/+ buffers/cache: 7348 22768
Swap: 506008 0 506008

aber part1,3,4 haben die gleiche Größe? Da wird wohl in der post-boot falsch gemountet, oder?:


#!/bin/sh
dropbear
# test if USB disc has been attached
# if not - then insert needed modules
#
# Die folgenden 4 Rauten entfernen, wenn eine USB-Platte angeschlossen ist. Beim
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi

#Wait for /opt to mount
mount /dev/discs/disc0/part2 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done

mount /dev/discs/disc0/part3 /tmp/harddisk
mount /dev/discs/disc0/part4 /tmp/harddisk

# Activate swap
swapon /dev/discs/disc0/part1

# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung
- /usr/local/sbin/post-boot 32/32 100%

die rc.unslung ist genau, wie in Wengis Tuto, folgende SW ist über ipkg installiert:


[asus@(none) root]$ ipkg list_installed
expat - 2.0.1-1 - XML Parser library
fontconfig - 2.3.2-5 - Font configuration library
freetype - 2.1.10-4 - Free truetype library
gconv-modules - 2.2.5-7 - Provides gconv modules missing from the firmware. These are used by glibc's iconv() implementation.
gnuplot - 4.2.0-5 - Command-line driven interactive data and function plotting utility
libbt - 1.05-5 - a C library implementing the core BitTorrent protocol
libcurl - 7.16.4-1 - Curl is a command line tool for transferring files with URL syntax, supporting FTP, FTPS, HTTP, HTTPS, GOPHER, TELNET, DICT, FI
libgd - 2.0.35-1 - An ANSI C library for the dynamic creation of images
libjpeg - 6b-2 - collection of jpeg tools
libpng - 1.2.19-1 - Portable Network Graphics Libraries
libuclibc++ - 0.2.2-4 - C++ standard library designed for use in embedded systems
logrotate - 3.7.1-4 - Rotates, compresses, removes and mails system log files.
ncurses - 5.6-1 - NCurses libraries
openssl - 0.9.7m-2 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
popt - 1.7-2 - A C library for parsing command line parameters.
readline - 5.2-2 - The GNU Readline library provides a set of functions for use by applications that allow users to edit command lines as they are
samba2 - 2.2.12-1 - Lightweight Samba suite provides file and print services to SMB/CIFS clients.
xinetd - 2.3.14-6 - Highly configurable, modular and secure inetd
zlib - 1.2.3-2 - zlib is a library implementing the 'deflate' compression system.
Successfully terminated.

und noch die ps axf

[asus@(none) root]$ ps axf
PID TTY STAT TIME COMMAND
1 ? S 0:01 /sbin/init
2 ? S 0:00 [keventd]
3 ? RN 0:00 [ksoftirqd_CPU0]
4 ? S 0:00 [kswapd]
5 ? S 0:00 [bdflush]
6 ? S 0:00 [kupdated]
7 ? S 0:00 [mtdblockd]
59 ? S 0:00 telnetd
186 pts/0 Ss 0:00 \_ -sh
190 pts/0 R+ 0:00 \_ ps axf
64 ? S 0:00 httpd vlan1
71 ? S 0:00 klogd
72 ? S 0:00 dnsmasq
73 ? S 0:00 syslogd -m 0 -O /tmp/syslog.log -S -l 7
78 ? S 0:00 [khubd]
87 ? Ss 0:00 lpd
89 ? Ss 0:00 p9100d -f /dev/usb/lp0 0
92 ? Ss 0:00 waveservermain
94 ? Ss 0:00 rcamdmain
98 ? S 0:00 [usb-storage-0]
99 ? S 0:00 [scsi_eh_0]
103 ? Ss 0:00 infosvr br0
104 ? Ss 0:02 watchdog
108 ? Ss 0:00 \_ ntp
115 ? S 0:00 dropbear
118 ? S 0:00 [kjournald]
151 ? S 0:00 udhcpc -i vlan1 -p /var/run/udhcpc0.pid -/tmp/udhcp
154 ? Ss 0:00 /opt/sbin/smbd -D
156 ? Ss 0:00 /opt/sbin/nmbd -D
161 ? S 0:00 stupid-ftpd
168 ? S 0:00 upnp -D -L br0 -W vlan1

aber ohne cron.

Und wenn ich die cron.daily/ipkgupdate sichern möchte erhalte ich folgende Meldung:

Write error: Input/outout error


Das gerade zu biegen kann doch gar kein großes Ding sein, sagt mir mein Hinterstübchen. Wer hat eine Idee?

Dank vorab
Chrissi

wengi
24-08-2007, 07:56
Hi,

Dein cron-Problem ist recht einfach gelöst: Du solltest es installieren!!! :D

Warum alllerdings part1, was ja der swap ist, gemounted wird ist mir ein Rätsel. Das gleiche Problem haben wir gerade hier (http://wl500g.info/showpost.php?p=61619&postcount=217).

Kannst Du bitte mal in der post-boot das swapon vor die mounts von part3 und 4 nehmen?

Danke
wengi

newbiefan
24-08-2007, 09:51
Hi,
ich hatte fast das gleiche Problem, allerdings habe ich nur 3 Partitionen.
Ein sleep 3 nach jedem mounten hat bei mir die Probleme geloest.

Hoffe, es hilft......

wengi
24-08-2007, 11:58
Danke für den Hinweis!
könnten das bitte mal alle Betroffenen testen und eine Rückmeldung geben?
danke
wengi

plan4b
24-08-2007, 22:46
So, hab das swapon über das mounten geschoben und das "done" ganz nach unten; Das ist das Ergebnis:

[asus@(none) root]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 2880 2880 0 100% /
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part2 988244 107196 830848 12% /opt
/dev/discs/disc0/part1 255941248 256 255940992 1% /tmp/harddisk
/dev/discs/disc0/part3 255941280 32 255941248 1% /tmp/harddisk/part1/dev/discs/disc0/part4 133162368 32 133162336 1% /tmp/harddisk/part2
zumindest unterscheiden sich die Partitionen jetzt voneinander.

Nach Einfügen des sleep 3 bleibt dieses Ergebnis.
Gerade fällt mir auf, dass die Swap nicht läuft (alles 0 bei "free")
habe ich erst mal wieder aktiviert (läuft), aber nach einem reboot nicht mehr.

Activate Swap wieder nach unten (sleep lasse ich mal drinnen): keine Änderung
Jetzt die beiden sleep weg: auch keine Änderung
Und nun wieder das done nach oben: AUCH keine Änderung

na gut vielleicht habe ich mich irgendwie vertippt. Dann mach ich die post-boot noch mal neu
Ich werde verrückt, die Swap ist nicht aktiv:
[asus@(none) root]$ free
total used free shared buffers
Mem: 30116 11192 18924 0 1356
Swap: 0 0 0
Total: 30116 11192 18924
die händische Aktivierung klappt aber problemlos

Dafür bleiben die Partitionen alle da (und sind unterschiedlich) und gemountet, obwohl ich nur Part3 mounte!:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part1 255941248 256 255940992 0% /tmp/harddisk
/dev/discs/disc0/part2 988244 107196 830848 11% /tmp/harddisk/part1
/dev/discs/disc0/part3 255941280 32 255941248 0% /tmp/harddisk/part2
/dev/discs/disc0/part4 133162368 32 133162336 0% /tmp/harddisk/part3


Es wird nichts nach /opt gemountet!!!!
Auch die erneute Abarbeitung der Pkte 3 & 4 im Tutorial helfen nicht...

An mein ursprüngliches Problem, dass ich nicht auf das Samba Webinterface komme, brauche ich im Moment gar nicht denken...
Großer Wengi ;) , was soll ich machen??? :confused:

Chrissi

newbiefan
25-08-2007, 19:20
Jedenfalls hatte ich fast die gleichen Probs, deshalb kopiere ich meine post-boot und die Ausgaben von df und free hierher.
Nehme ich die Sleeps heraus, wird kein swap aktiviert (Samba geht nicht mehr bei heavy data transfer), Mounts sind eher willkuerlich.
Beruecksichtige bitte, dass nach jedem Mount die sleep 2 notwendig ist.

post-boot:

#!/bin/sh
dropbear

# test if USB disc has been attached
# if not - then insert needed modules
#
# Die folgenden 4 Rauten entfernen, wenn eine USB-Platte angeschlossen ist. Beim WL-HDD nicht notwendig, da IDE.
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi

#Wait for /opt to mount
mount /dev/discs/disc0/part1 /opt
i=0
while [ $i -le 30 ]
do
if [ -d /opt/etc ]
then
break
fi
sleep 1
i=`expr $i + 1`
done

#Version 0.11, network heli.lan
#Attention - it takes at least 1 second to perform a mount on my Asus
#post-boot needs to be improved, taken into list #03
# Activate swap, wait a bit
swapon /dev/discs/disc0/part2
sleep 2
# Mount the rest and wait a bit until mount is performed proper
mount /dev/discs/disc0/part3 /tmp/harddisk
sleep 2
#start new http server at port 8080 for my private website
#considering perl start script at /opt/wwwp/cgi-bin (list #6)
busybox_httpd -p 8080 -h /opt/wwwp
sleep 2
# Run all active services - active means starts with S
/opt/etc/init.d/rc.unslung


[admin@xxxx root]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
rootfs 2880 2880 0 100% /
/dev/root 2880 2880 0 100% /
/dev/discs/disc0/part1
1018298 67746 897941 8% /opt
/dev/discs/disc0/part3
108188859 2380953 99884339 3% /tmp/harddisk

[admin@xxxx root]$ free
total used free shared buffers cached
Mem: 30116 21380 8736 0 3004 9228
-/+ buffers/cache: 9148 20968
Swap: 524276 0 524276

wengi
26-08-2007, 06:25
@newbiefan
Hast Du die Partitionen im WL-HDD angelegt oder auch, wie plan4b am Rechner (Das habe ich doch richtig in Erinnerung, oder?)?

wengi

newbiefan
26-08-2007, 08:37
@wengi
Ich habe einen Asus WL-500gP mit USB HDD (wegen der schnellen CPU)
Wenn man eine langsamere CPU hat, sollte man mit den sleeps etwas hoeher gehen.
LG

Edit: sorry, habe die Frage ueberlesen, wengi

Habe den paragon partition manager benutzt, also auf dem PC angelegt.
Unbedingt ext3 verwenden, ansonsten sollte man pruefen, ob die richtigen module auch eingebunden wurden.
ext2, vfat usw.

wengi
26-08-2007, 18:06
Hallo Allerseits,
Jeder, der bisher solche Probleme hatte, hat anscheinend die Partitionen mit einem Rechner angelegt. Wir hatten in Vergangenheit bereits solche Fälle und da war es, wenn ich mich recht erinnere, genauso.

Also plan4b:
Entweder die slleps mal erhöhen oder die Partitionen auf dem Router selbst anlegen.

Das ist jetzt für Dich zwar ein ziemlicher Aufwand aber meiner Meinung nach die einzige Möglichkeit das zu verifizieren.
Mir fällt sonst nämlich nichts mehr ein.:(

wengi

floei
26-08-2007, 18:38
Hallo nochmal,

also das problem ist, das dieses auftretende Dilemma zumindest bei mir nicht rekonstruierbar ist. Die Ergebnisse sind jedes mal anders sobald ich die Discs abstecke und gleich(!) wieder anstecke.

Auf einer englischen Seite http://forum.toppy.org.uk/forum/viewtopic.php?t=7316&postdays=0&postorder=asc&start=15habe ich folgenden Code gefunden - der interessante Ansatz ist, dass nicht die disc sonder der SCSI-blalba gemountet wird. Ausserdem wird über die grösse (mystick variable) die eindeutige zuordnung getroffen.

Abstellen kann ich noch immer nicht,dass automatisch eine ext-hd auch noch nach /tmp/harddisk gemountet wird. aber ich arbeite dran,

lg Floei



## this is the size from fdisk of /opt partition
mystick=251689
#test if USB disc has been attached
# if not - then insert needed modules
if [ ! -d /dev/discs ]
then
insmod scsi_mod && insmod sd_mod && insmod usb-storage && sleep 5s
fi

# mount the usb drive
# look for USB stick
# If other USB disk is plugged in it moves around..
fdisk -l| grep ^/dev/scsi| while read p s e size rest;do
[ $size -eq $mystick ] && mount -o rw,noatime $p /opt
done

# wait for max 30s for /opt to mount
i=0
while [ $i -le 30 ]; do
[ -d /opt/etc ] && break
sleep 1
i=$((i+1))
done

wengi
27-08-2007, 06:45
Abstellen kann ich noch immer nicht,dass automatisch eine ext-hd auch noch nach /tmp/harddisk gemountet wird. aber ich arbeite dran

Das bekommst Du im Zweifelsfall über ein unmount hin.

wengi

floei
30-08-2007, 15:06
So, mittlerweile funktioniert es. Beide Festplatten werden brav gemountet:


[admin@klamschi hd1]$ df
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/root 2880 2880 0 100% /
/dev/scsi/host2/bus0/target0/lun0/part1 74351 58934 11578 84% /opt
/dev/discs/disc0/part1 480696480 339043552 117234132 74% /tmp/hd1
/dev/discs/disc1/part1 480719056 135120 456164736 0% /tmp/hd2


Den automatischen mount auf /tmp/harddisk musste ich per umount in der postboot umgehen.

Nun gibts ein neues Problemchen -> neuer Thread.

Danke an alle soweit für die Mithilfe!

lg floei