ottscho
Goto Top

CRON - Bad File Mode

Hallo,

auf unserem SLES 10 wurde die Rechte zerschossen bzw. 777 ausgeführt. Wie auch immer das passieren konnte.
ich versuche nun die Rechte wieder herzustellen. Leider hat es noch nicht mit allen Anwendungen geklappt.
Ich bekomme CRON nicht zum Laufen.

Fehler in /var/logs/messages:
Mar 4 09:53:52 srvlx01 /usr/sbin/cron[18981]: (CRON) STARTUP (V5.0)
Mar 4 09:53:52 srvlx01 /usr/sbin/cron[18981]: (root) BAD FILE MODE (tabs/root)
Mar 4 09:56:14 srvlx01 /usr/sbin/cron[19047]: (CRON) STARTUP (V5.0)
Mar 4 09:56:14 srvlx01 /usr/sbin/cron[19047]: (root) BAD FILE MODE (tabs/root)

Die Rechte von /usr/sbin/cron habe ich aber wieder hergestellt.

An was könnte dies noch liegen?

Danke

Gruß
ottscho

Content-Key: 137392

Url: https://administrator.de/contentid/137392

Printed on: April 26, 2024 at 18:04 o'clock

Member: jhinrichs
jhinrichs Mar 04, 2010 at 09:49:37 (UTC)
Goto Top
Hallo,
zumindest unter RedHat darf die userspezifische Crontab (also die Datei .../tabs/root) nur für den User les- und schreibbar sein, also Mode 600.
Vielleicht könnte ein
chmod /var/woauchimmer/tabs/* 600
helfen.
Auf der anderen Seite wird der Cron-Dienst nicht der einzige sein, ssh z.B. meckert auch bei zu weitreichenden Zugriffsrechten, das Sicherheitsrisiko, wenn alle alles dürfen, ist natürlich auch nicht zu unterschätzen (alle haben Zugriff auf Passwortdateien, können munter Dienste starten und stoppen, gut ist auch immer ein "rm -r *" im Wurzelverzeichnis....
Also: Backup wieder einspielen oder neu installieren.
Grüße
P.S.: Gab es unter Suse nicht das Perl-Skript chkstat, mit dem man Rechte "im Schwung" setzen kann, es benötigt m. W. nur eine Eingabedatei mit den zu bearbeitenden Dateien. Aber vielleicht gibt es so eine Datei ja standardmäßig für die Systemdateien. Oder Suse bietet eine "Reparaturinstallation?". Hier wird's distributionsspezifisch.
Member: ottscho
ottscho Mar 04, 2010 at 10:13:50 (UTC)
Goto Top
ssh, habe ich schon wieder zum laufen bekommen.
Es gibt von Suse auf ein Script, wo falsche Berechtigungen anzeigt.
Aber leider nicht für alle Dateien.

Ich habe nun /var/spool/crobn/tabs 600 berechtigt.
Leider ohne erfolg. 644 geht auch nicht.

Ich habe nun die Datei root, welche im Ordner tabs vorhanden war gelöscht.
Nun habe ich keinen Fehler mehr in Messages.

Ich hoffe die crons werden nun ausgeführt...
Member: jhinrichs
jhinrichs Mar 04, 2010 at 10:29:42 (UTC)
Goto Top
Hallo,
wie gesagt, wenn es ein irgendwie produktiv eingesetztes System ist, sollte man sich nicht auf ein "hoffentlich läuft es" verlassen, insbesondere auch aus Sicherheitsaspekten. Der crond holt sich seine Aufträge in der Standardkonfiguration aus /etc/crontab und aus den Tabellen in /var/spool/cron/tabs (unter Suse). Die Einträge in /etc/crontab sollten laufen.
Grüße
Member: ottscho
ottscho Mar 04, 2010 at 10:37:52 (UTC)
Goto Top
ja gut, ich werd natürlich überprüfen, ob die crons nun laufen.
EDIT. Cron funktioniet wieder.

aber eine Neuinstallation kann ich zur Zeit nicht durchführen.
An dem Server arbeiten im Moment 10 Clients. Die Aufgaben der Clients funktionieren einwandfrei, hier habe ich bis jetzt keine Fehler feststellen können.
Member: reni09
reni09 Mar 04, 2010 at 11:29:39 (UTC)
Goto Top
Zitat von @ottscho:

Es gibt von Suse auf ein Script, wo falsche Berechtigungen anzeigt.

Dieses Script würde mich interessieren.
Wo kann ich das finden?

Gruß Reni
Member: ottscho
ottscho Mar 04, 2010 at 11:57:24 (UTC)
Goto Top
SuSEconfig --module permissions


Wenn alles passt wird das angezeigt:
srvlx01:~ # SuSEconfig --module permissions
Starting SuSEconfig, the SuSE Configuration Tool...
Running module permissions only
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.permissions...
Finished.


Wenn Berechtigungen an den Modulen falsch sind, dann kann es so aussehen:srvlx01:/etc # SuSEconfig --module permissions
Starting SuSEconfig, the SuSE Configuration Tool...
Running module permissions only
Reading /etc/sysconfig and updating the system...
Executing /sbin/conf.d/SuSEconfig.permissions...
Checking permissions and ownerships - using the permissions files
/etc/permissions.d/postfix
/etc/permissions.d/susehelp
/etc/permissions.d/yup
/etc/permissions
/etc/permissions.easy
/etc/permissions.local
setting /usr/sbin/postdrop to root:maildrop 2755. (wrong permissions 0777)
/usr/sbin/postdrop: will not give away s-bits on an insecure path
setting /usr/sbin/postqueue to root:maildrop 2755. (wrong permissions 0777)
/usr/sbin/postqueue: will not give away s-bits on an insecure path
setting /usr/sbin/utempter to root:tty 2755. (wrong permissions 0777)
/usr/sbin/utempter: will not give away s-bits on an insecure path
setting /usr/bin/suidperl to root:root 0755. (wrong permissions 0777)
/usr/bin/suidperl: on an insecure path
setting /usr/bin/at to root:trusted 4755. (wrong permissions 0777)
/usr/bin/at: will not give away s-bits on an insecure path
setting /usr/bin/crontab to root:trusted 4755. (wrong permissions 0777)
/usr/bin/crontab: will not give away s-bits on an insecure path
setting /usr/bin/gpasswd to root:shadow 4755. (wrong permissions 0777)
/usr/bin/gpasswd: will not give away s-bits on an insecure path
setting /usr/bin/newgrp to root:root 4755. (wrong permissions 0777)
/usr/bin/newgrp: will not give away s-bits on an insecure path
setting /usr/bin/passwd to root:shadow 4755. (wrong permissions 0777)
/usr/bin/passwd: will not give away s-bits on an insecure path
setting /usr/bin/chfn to root:shadow 4755. (wrong permissions 0777)
/usr/bin/chfn: will not give away s-bits on an insecure path
setting /usr/bin/chage to root:shadow 4755. (wrong permissions 0777)
/usr/bin/chage: will not give away s-bits on an insecure path
setting /usr/bin/chsh to root:shadow 4755. (wrong permissions 0777)
/usr/bin/chsh: will not give away s-bits on an insecure path
setting /usr/bin/expiry to root:shadow 4755. (wrong permissions 0777)
/usr/bin/expiry: will not give away s-bits on an insecure path
setting /usr/bin/sudo to root:root 4755. (wrong permissions 0777)
/usr/bin/sudo: will not give away s-bits on an insecure path
setting /usr/bin/opiepasswd to root:root 4755. (wrong permissions 0777)
/usr/bin/opiepasswd: will not give away s-bits on an insecure path
setting /usr/bin/opiesu to root:root 4755. (wrong permissions 0777)
/usr/bin/opiesu: will not give away s-bits on an insecure path
setting /usr/bin/ncpmount to root:trusted 4750. (wrong permissions 0777)
/usr/bin/ncpmount: will not give away s-bits on an insecure path
setting /usr/bin/ncpumount to root:trusted 4750. (wrong permissions 0777)
/usr/bin/ncpumount: will not give away s-bits on an insecure path
setting /usr/lib64/pt_chown to root:root 4755. (wrong permissions 0777)
/usr/lib64/pt_chown: will not give away s-bits on an insecure path
setting /opt/gnome/lib/vte/gnome-pty-helper to root:tty 2755. (wrong permissions 0777)
/opt/gnome/lib/vte/gnome-pty-helper: will not give away s-bits on an insecure path
setting /usr/bin/gpg to root:root 4755. (wrong permissions 0777)
/usr/bin/gpg: will not give away s-bits on an insecure path
setting /usr/bin/vlock to root:shadow 2755. (wrong permissions 0777)
/usr/bin/vlock: will not give away s-bits on an insecure path
setting /usr/X11R6/bin/Xorg to root:root 4711. (wrong permissions 0777)
/usr/X11R6/bin/Xorg: will not give away s-bits on an insecure path
setting /usr/bin/man to root:root 4755. (wrong permissions 0777)
/usr/bin/man: on an insecure path
setting /usr/bin/mandb to root:root 4755. (wrong permissions 0777)
/usr/bin/mandb: on an insecure path
setting /usr/bin/wall to root:tty 2755. (wrong permissions 0777)
/usr/bin/wall: will not give away s-bits on an insecure path
setting /usr/bin/write to root:tty 2755. (wrong permissions 0777)
/usr/bin/write: will not give away s-bits on an insecure path
setting /usr/bin/nwsfind to root:trusted 4750. (wrong permissions 0777)
/usr/bin/nwsfind: will not give away s-bits on an insecure path
setting /usr/bin/ncplogin to root:trusted 4750. (wrong permissions 0777)
/usr/bin/ncplogin: will not give away s-bits on an insecure path
setting /usr/bin/ncpmap to root:trusted 4750. (wrong permissions 0777)
/usr/bin/ncpmap: will not give away s-bits on an insecure path
setting /opt/gnome/lib/libgnomesu/gnomesu-pam-backend to root:root 4755. (wrong permissions 0777)
/opt/gnome/lib/libgnomesu/gnomesu-pam-backend: will not give away s-bits on an insecure path
setting /opt/gnome/sbin/change-passwd to root:root 4755. (wrong permissions 0777)
/opt/gnome/sbin/change-passwd: will not give away s-bits on an insecure path
setting /usr/bin/lppasswd to lp:sys 4755. (wrong permissions 0777)
/usr/bin/lppasswd: will not give away s-bits on an insecure path
setting /usr/bin/rcp to root:root 4755. (wrong permissions 0777)
/usr/bin/rcp: will not give away s-bits on an insecure path
setting /usr/bin/rlogin to root:root 4755. (wrong permissions 0777)
/usr/bin/rlogin: will not give away s-bits on an insecure path
setting /usr/bin/rsh to root:root 4755. (wrong permissions 0777)
/usr/bin/rsh: will not give away s-bits on an insecure path
setting /usr/sbin/suexec2 to root:root 4755. (wrong permissions 0777)
/usr/sbin/suexec2: will not give away s-bits on an insecure path
setting /opt/kde3/bin/kcheckpass to root:shadow 4755. (wrong permissions 0777)
/opt/kde3/bin/kcheckpass: will not give away s-bits on an insecure path
setting /opt/kde3/bin/khc_indexbuilder to root:man 2755. (wrong permissions 0777)
/opt/kde3/bin/khc_indexbuilder: will not give away s-bits on an insecure path
setting /opt/kde3/bin/kdesud to root:nogroup 2755. (wrong permissions 0777)
/opt/kde3/bin/kdesud: will not give away s-bits on an insecure path
setting /opt/kde3/bin/kpac_dhcp_helper to root:root 4755. (wrong permissions 0777)
/opt/kde3/bin/kpac_dhcp_helper: will not give away s-bits on an insecure path
setting /usr/bin/fileshareset to root:root 4755. (wrong permissions 0777)
/usr/bin/fileshareset: will not give away s-bits on an insecure path
ERROR: not all operations were successful.
Finished.
Member: reni09
reni09 Mar 04, 2010 at 13:13:06 (UTC)
Goto Top
Danke für diese Info!

Gruß Reni