Ocky
November 20th, 2008, 07:54 AM
For some stupid reason (curiousity), I opened a root shell in terminal and
then instead of just exiting, typed sudo passwd -l root to disable
root account.
Now in my auth.log I see entries like this :-
CRON[32633]: pam_unix(cron:account): account root has expired
On further investigation I have learnt that the above fateful command
breaks cron jobs and that no new users can be added. Also some install
scripts may not run. Apparently this is a bug in Hardy that has not been
patched as yet. I want to get back to the default root account settings,
i.e. disabled but not expiring.
The workarounds I have come across are:-
sudo usermod -p ! root
and:-
$ sudo vim /etc/shadow
change the line:
root:!:13919:0:99999:7::1:
to
root:!:13919:0:99999:7:::
Question. Do both methods achieve the same result, or do I have to
do both of them ??
Regards.
then instead of just exiting, typed sudo passwd -l root to disable
root account.
Now in my auth.log I see entries like this :-
CRON[32633]: pam_unix(cron:account): account root has expired
On further investigation I have learnt that the above fateful command
breaks cron jobs and that no new users can be added. Also some install
scripts may not run. Apparently this is a bug in Hardy that has not been
patched as yet. I want to get back to the default root account settings,
i.e. disabled but not expiring.
The workarounds I have come across are:-
sudo usermod -p ! root
and:-
$ sudo vim /etc/shadow
change the line:
root:!:13919:0:99999:7::1:
to
root:!:13919:0:99999:7:::
Question. Do both methods achieve the same result, or do I have to
do both of them ??
Regards.