Beiträge von feofan69

    Nein.

    Für eine user- oder root-crontab, benutzt man "crontab -e".

    Die systemweite crontab wird u. a. auch dafür benutzt, wenn man als root für einen (anderen) user einen cronjob anlegen will und der (andere) user das nicht tun kann bzw. nicht tun soll bzw. diesen cronjob auch nicht ändern/löschen soll/darf. Denn zum editieren (mit einem geeigneten Editor) der systemweiten crontab, werden root-Rechte benötigt und nicht jeder user kann/soll/darf auch root-Rechte (oder gleichwertig) bekommen.

    Verstanden.

    wie sieht dann Job aaus, wenn man root Rechte für Script braucht?

    0 3 * * 1 root /usr/bin/apt update -q -y > /var/log/cron_os_updates.log

    oder

    0 3 * * 1 adm sudo /usr/bin/apt update -q -y > /var/log/cron_os_updates.log

    Du solltest zum Editieren der contabs ausschiesslich < crontab -e > verwenden.. Siehe < man crontab >

    < sudo crontab -e > für die crontab des Users root,

    < crontab -e > für die crontab des angemeldeten Users.

    Servus !

    Na dann verstehe ich nicht wozu wird /etc/crontab beöntigt

    # /etc/crontab: system-wide crontab

    # Unlike any other crontab you don't have to run the `crontab'

    # command to install the new version when you edit this file

    # and files in /etc/cron.d. These files also have username fields,

    # that none of the other crontabs do.

    Hallo zusammen,

    ich versuche ein cron job einzurichten. Dafür nutze ich ein system wide cronjob table:

    sudo nano /etc/crontab

    Folegnde Jobs habe ich eingerichtet:

    00 12 * * 0 adm /usr/bin/apt update -q -y >> /var/log/automaticupdates.log

    10 12 * * 0 adm /usr/bin/apt upgrade -q -y >> /var/log/automaticupdates.log

    Leider wird die Ausgabe nicht in log file automaticupdates.log umgeleitet, weil den user adm hat keine rechte Dateil in Verzeicheniss anzulegen. Ich dachte wenn man s"ystem wide cronjob table" nutzt hat man automatisch sudo Rechte :(

    Muss man am besten File manuelle anlegen und Rechte geben? Oder Job mit sudo starten?

    Ein 1,2A NT ist für einen RPi 2B extrem am unteren Limit und wenn man bedenkt, dass Netzteile altern, dann wundert mich hier nichts mehr!

    Ich habe jetzt 2A genommen. Malsehen was passiert ;) Ich werde berichten.

    Steht aber auch im syslog: "run fsck manually"

    Zum Reparieren musst Du die defekte SD in einen USB Cardreader stecken und am ungemounteten Device als root "fsck.ext4" mit den gewünschten Reparaturoptionen ausführen.

    < man fsck.ext4 > oder < man e2fsck >

    Servus !

    Danke, für den Tipp. Ich möchte aber Ursache finden. Ich zwei gleiche PIs und zwei gleiche SD Cards. Beide steiegn oft aus.

    Ich habe endlich gefunden, was ich für Problem habe. Filesystem wird beshädigt.

    Mache ich

    Code
    touch /forcefsck

    Funktioniert 3-4 Tagen, danach geliches Problem. Ich habe schon verschiedene SD Karten probiert.

    Das Verzeichnis /var/log ist voll davon! ;) Wichtig dürften vor allem die syslog* und ggf. auch die auth.log* Dateien sein.

    //Edit

    Wie sind die beiden RPi im Netzwerk (LAN oder WLAN)? Welches Netzteil verwendest Du und war das bei beiden das selbe?

    //Edit2

    Haben die betroffenen RPi feste IP-Adressen in Deinem Netzwerk? Wie sprichst Du die RPi per SSH an, mit der IP oder mit dem Hostnamen?

    Welche log kann Licht ins dunkel bringen ;)

    Das Verzeichnis /var/log ist voll davon! ;) Wichtig dürften vor allem die syslog* und ggf. auch die auth.log* Dateien sein.

    //Edit

    Wie sind die beiden RPi im Netzwerk (LAN oder WLAN)? Welches Netzteil verwendest Du und war das bei beiden das selbe?

    //Edit2

    Haben die betroffenen RPi feste IP-Adressen in Deinem Netzwerk? Wie sprichst Du die RPi per SSH an, mit der IP oder mit dem Hostnamen?

    Beide RPi sind über LAN (feste IP) angebunden. Um probleme mit DNS zu vermeiden, nutze ich IP. Netzteil 1A. Sollich mehr nehemen?

    Hallo zusammen,

    hat jemand schon ein Problem mit SSH gehabt? Ich habe ein altes "Raspberry Pi 2 Model B Rev 1.1" möchte als Werbungblocker nutzen.

    Ich habe GUI lose OS installiert und drauf AdGuard. Leider mit der Zeit funktioniert PI nicht mehr weder AdGuard noch SSH Zugriff. Man muss in stromlos machen. Das geliche passiert wenn ich Pi-Hole brauf installiere. Ich habe zwei PIs. Leider beide zeigen geliche Verhalten. Es ist nicht regelmässig, machmal 2-3 mal die Woche, machmal öfter.

    Ich habe verschieden Log angeschaut

    journalctl -b

    journalctl -k

    finde aber da kein Hinweis. Gibt es noch mehr Logs? Oder sind beide Platinen für die Mülltonne?

    Danke.

    Hallo zusammen,

    nach mehrere Jahre im Windows-Welt, habe ich endlich entschieden mich auch in Linux-Welt einzusteigen. Für viele Lösungen ist der Lunix viel besser als Windows geeignet.
    Um Linux zu lernen habe ich mir Raspberry Pi geholt.

    Man kann 1000 von Anleitungen für Raspberry Pi in Netz finden. Das ist einfach perfekt. Nur läuft nicht alles wie es beschrieben.

    Um Monitor zu sparen, habe ich zu SSH auf RPi der X11VNC installiert. Viele Lösungen ausprobiert und nur eine hat geklappt.

    X11VNC wir automatisch über ~/.xsessionrc gestartet. Hier ist die Startparameter: x11vnc -bg -nevershared -forever -tightfilexfer -usepw -display :0

    Was hier nicht funktioniert:
    1. Nachdem schleißen des Windows TightVNC(2.7.10) – Client, wird X11VNC Prozess terminiert. Obwohl es wird mit –bg gestaret. Starte ich diese Prozess manuell (s. Oben) läuft es ohne Probleme. Man kann mit VNC mehrmals auf RPi zugreifen.
    2. File-Transfer funktioniert nicht. Obwohl es wird mit Option –tightfilexfer gestartet.
    Danke für eure Hilfe

    ***LOG***
    06/04/2015 08:30:18 passing arg to libvncserver: -nevershared
    06/04/2015 08:30:18 -usepw: found /home/pi/.vnc/passwd
    06/04/2015 08:30:18 x11vnc version: 0.9.13 lastmod: 2011-08-10 pid: 2393
    06/04/2015 08:30:18 rfbRegisterTightVNCFileTransferExtension: 6
    06/04/2015 08:30:18 Using X display :0
    06/04/2015 08:30:18 rootwin: 0xe2 reswin: 0x400001 dpy: 0x2236000
    06/04/2015 08:30:18
    06/04/2015 08:30:18 ------------------ USEFUL INFORMATION ------------------
    06/04/2015 08:30:19 X DAMAGE available on display, using it for polling hints.
    06/04/2015 08:30:19 To disable this behavior use: '-noxdamage'
    06/04/2015 08:30:19
    06/04/2015 08:30:19 Most compositing window managers like 'compiz' or 'beryl'
    06/04/2015 08:30:19 cause X DAMAGE to fail, and so you may not see any screen
    06/04/2015 08:30:19 updates via VNC. Either disable 'compiz' (recommended) or
    06/04/2015 08:30:19 supply the x11vnc '-noxdamage' command line option.
    06/04/2015 08:30:19
    06/04/2015 08:30:19 Wireframing: -wireframe mode is in effect for window moves.
    06/04/2015 08:30:19 If this yields undesired behavior (poor response, painting
    06/04/2015 08:30:19 errors, etc) it may be disabled:
    06/04/2015 08:30:19 - use '-nowf' to disable wireframing completely.
    06/04/2015 08:30:19 - use '-nowcr' to disable the Copy Rectangle after the
    06/04/2015 08:30:19 moved window is released in the new position.
    06/04/2015 08:30:19 Also see the -help entry for tuning parameters.
    06/04/2015 08:30:19 You can press 3 Alt_L's (Left "Alt" key) in a row to
    06/04/2015 08:30:19 repaint the screen, also see the -fixscreen option for
    06/04/2015 08:30:19 periodic repaints.
    06/04/2015 08:30:19
    06/04/2015 08:30:19 XFIXES available on display, resetting cursor mode
    06/04/2015 08:30:19 to: '-cursor most'.
    06/04/2015 08:30:19 to disable this behavior use: '-cursor arrow'
    06/04/2015 08:30:19 or '-noxfixes'.
    06/04/2015 08:30:19 using XFIXES for cursor drawing.
    06/04/2015 08:30:19 GrabServer control via XTEST.
    06/04/2015 08:30:19
    06/04/2015 08:30:19 Scroll Detection: -scrollcopyrect mode is in effect to
    06/04/2015 08:30:19 use RECORD extension to try to detect scrolling windows
    06/04/2015 08:30:19 (induced by either user keystroke or mouse input).
    06/04/2015 08:30:19 If this yields undesired behavior (poor response, painting
    06/04/2015 08:30:19 errors, etc) it may be disabled via: '-noscr'
    06/04/2015 08:30:19 Also see the -help entry for tuning parameters.
    06/04/2015 08:30:19 You can press 3 Alt_L's (Left "Alt" key) in a row to
    06/04/2015 08:30:19 repaint the screen, also see the -fixscreen option for
    06/04/2015 08:30:19 periodic repaints.
    06/04/2015 08:30:19
    06/04/2015 08:30:19 XKEYBOARD: number of keysyms per keycode 7 is greater
    06/04/2015 08:30:19 than 4 and 51 keysyms are mapped above 4.
    06/04/2015 08:30:19 Automatically switching to -xkb mode.
    06/04/2015 08:30:19 If this makes the key mapping worse you can
    06/04/2015 08:30:19 disable it with the "-noxkb" option.
    06/04/2015 08:30:19 Also, remember "-remap DEAD" for accenting characters.
    06/04/2015 08:30:19
    06/04/2015 08:30:19 X FBPM extension not supported.
    06/04/2015 08:30:19 X display is capable of DPMS.
    06/04/2015 08:30:19 --------------------------------------------------------
    06/04/2015 08:30:19
    06/04/2015 08:30:19 Default visual ID: 0x21
    06/04/2015 08:30:19 Read initial data from X display into framebuffer.
    06/04/2015 08:30:19 initialize_screen: fb_depth/fb_bpp/fb_Bpl 16/16/3840
    06/04/2015 08:30:19
    06/04/2015 08:30:19 X display :0 is 16bpp depth=16 true color
    06/04/2015 08:30:19
    06/04/2015 08:30:19 Autoprobing TCP port
    06/04/2015 08:30:19 Autoprobing selected TCP port 5900
    06/04/2015 08:30:19 Autoprobing TCP6 port
    06/04/2015 08:30:19 rfbListenOnTCP6Port: error in bind IPv6 socket: Address family not supported by protocol
    06/04/2015 08:30:20 Failure autoprobing: Address family not supported by protocol
    06/04/2015 08:30:20 listen6: socket: Address family not supported by protocol
    06/04/2015 08:30:20 (Ignore the above error if this system is IPv4-only.)
    06/04/2015 08:30:20 Not listening on IPv6 interface.
    06/04/2015 08:30:21 fb read rate: 31 MB/sec
    06/04/2015 08:30:21 The X server says there are 10 mouse buttons.
    06/04/2015 08:30:21 screen setup finished.
    06/04/2015 08:30:21

    The VNC desktop is: raspberrypi:0

    ******************************************************************************
    Have you tried the x11vnc '-ncache' VNC client-side pixel caching feature yet?

    The scheme stores pixel data offscreen on the VNC viewer side for faster
    retrieval. It should work with any VNC viewer. Try it by running:

    x11vnc -ncache 10 ...

    One can also add -ncache_cr for smooth 'copyrect' window motion.
    More info: http://www.karlrunge.com/x11vnc/faq.html#faq-client-caching


    06/04/2015 08:30:21 check_xrandr_event():
    06/04/2015 08:30:21 Detected XRANDR event at location 'check_xevents':
    06/04/2015 08:30:21 check_xrandr_event: no change detected.
    06/04/2015 08:30:21 check_xrandr_event: enabling full XRANDR trapping anyway.
    06/04/2015 08:32:02 Got connection from client 10.10.10.100
    06/04/2015 08:32:02 other clients:
    06/04/2015 08:32:02 Normal socket connection
    06/04/2015 08:32:02 Disabled X server key autorepeat.
    06/04/2015 08:32:02 to force back on run: 'xset r on' (3 times)
    06/04/2015 08:32:02 incr accepted_client=1 for 10.10.10.100:52572 sock=10
    06/04/2015 08:32:02 Client Protocol Version 3.8
    06/04/2015 08:32:02 Protocol version sent 3.8, using 3.8
    06/04/2015 08:32:02 rfbProcessClientSecurityType: executing handler for type 16
    06/04/2015 08:32:02 tightvnc-filetransfer/rfbHandleSecTypeTight
    06/04/2015 08:32:02 tightvnc-filetransfer/rfbSendTunnelingCaps
    06/04/2015 08:32:02 tightvnc-filetransfer/rfbSendAuthCaps
    06/04/2015 08:32:02 tightvnc-filetransfer/rfbProcessClientAuthType
    06/04/2015 08:32:02 tightvnc-filetransfer/rfbVncAuthSendChallenge
    06/04/2015 08:32:10 tightvnc-filetransfer/rfbSendInteractionCaps
    06/04/2015 08:32:10 client useCopyRect: 10.10.10.100 0
    06/04/2015 08:32:10 client_set_net: 10.10.10.100 0.0092
    06/04/2015 08:32:10 created xdamage object: 0x400040
    06/04/2015 08:32:11 Using image quality level 6 for client 10.10.10.100
    06/04/2015 08:32:11 Using JPEG subsampling 0, Q79 for client 10.10.10.100
    06/04/2015 08:32:11 Enabling NewFBSize protocol extension for client 10.10.10.100
    06/04/2015 08:32:11 Enabling LastRect protocol extension for client 10.10.10.100
    06/04/2015 08:32:11 Enabling cursor position updates for client 10.10.10.100
    06/04/2015 08:32:11 Enabling full-color cursor updates for client 10.10.10.100
    06/04/2015 08:32:11 Using tight encoding for client 10.10.10.100
    06/04/2015 08:32:11 Pixel format for client 10.10.10.100:
    06/04/2015 08:32:11 32 bpp, depth 24, little endian
    06/04/2015 08:32:11 true colour: max r 255 g 255 b 255, shift r 16 g 8 b 0
    06/04/2015 08:32:13 created selwin: 0x400041
    06/04/2015 08:32:13 called initialize_xfixes()
    06/04/2015 08:32:13 copy_tiles: allocating first_line at size 61
    06/04/2015 08:32:15 client_count: 0
    06/04/2015 08:32:15 Restored X server key autorepeat to: 1
    06/04/2015 08:32:15 viewer exited.
    06/04/2015 08:32:15 deleted 60 tile_row polling images.