On Fri, Sep 04, 2009 at 03:31:08PM +0200, Giacomo A. Catenazzi wrote: > Bill Allombert wrote: >> Dear Debian boot, >> >> It is now possible to set up Debian system without a root password. >> On such system sudo must be used instead of su. >> What is the canonical way to detect such situation ? >> >> My purpose is to change su-to-root to automatically default to sudo mode >> on such system. > > I would use: > passwd --status root > > And look if it is expired, locked, or with an invalid password (RTFM > to interpret the output)
But you need to be root to do that, which kind of defeat the point of su-to-root. Cheers, -- Bill. <[email protected]> Imagine a large red swirl here. -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

