[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to detect Debian systems w/o root passwd ?



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)

ciao
	cate


Reply to: