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

Re: Detect if root login is disabled?



07.12.2011 12:53, Daniel Hartwig пишет:
> Hello
> 
> I am looking at Bug#516854 and wondering:
> 
> Is there a robust way for a *user* to detect if root login is
> disabled?  Would like to perform such a check from an instance of
> aptitude running as a user account.
> 
> I am aware of the following method which detects the `passwd -l' style
> lock, however, it requires read access to /etc/shadow:
> 
> io:~# passwd -S root | grep " L " > /dev/null; echo $?
> 1
> io:~# passwd -l root
> passwd: password expiry information changed.
> io:~# passwd -S root | grep " L " > /dev/null; echo $?
> 0
> 
> Thanks
> 
> 

su?


Reply to: