Das leidige Thema: Wie Kommando als jemand anderes ausführen? (su -m)

From: Heino Tiedemann <rotkaps_spam_trap(at)gmx.de>
Date: Wed, 18 Aug 2004 23:05:26 +0200

Hallo,

ich editiere gerade meine /etc/ppp/ppp.linkup.

Laut FreeBSD-Handbuch, Kapitel "SMTP-Dialup"
<http://www.freebsd.org/doc/de_DE.ISO8859-1/books/handbook/smtp-dialup.html>,
soll so Sendmail aufgerufen werden:

    !bg su user -c "sendmail -q"

Okai - Der User für Sendmail ist "mailnull"

    HINT: Bei mir werkelt nicht Sendmail, sondern Exim, aber das
    spielt hier keine Rolle, auch für ihn ist "mailnull" der
    entsprechende User.

Problem:

mailnull:*:26:26:Sendmail Default User:/var/spool/mqueue:/sbin/nologin
                                                         ^^^^^^^^^^^^^

Trockentest:

-su-2.05b# whoami
root
-su-2.05b# su mailnull -c "exim -qff"
This account is currently not available.
-su-2.05b# su -m mailnull -c "exim -qff"
-su-2.05b#

Man sieht also, das mann nicht einfach
  su mailnull -c "exim -qff"
machen kann, weil mailnull ein "/sbin/nologin" User ist.

Abhilfe: su -m mailnull -c "exim -qff"

Nun, in dieser Liste wurde mir aber schon gesagt: "Lass die Finger
von 'su -m'".

Frage, wie ist es _richtig_? Wie ist es eine gute lösung im Unix-Sinn?

Heino

To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Wed 18 Aug 2004 - 23:13:30 CEST

search this site