Security of using sudo rather than su?

Adam Funk a24061 at yahoo.com
Mon Sep 25 10:14:37 UTC 2006


On 2006-09-15, Adam Funk <a24061 at yahoo.com> wrote:
> On 2006-09-15, Alan McKinnon <alan at linuxholdings.co.za> wrote:
>
>>> * Does `passwd -d` produce status NP?
>>
>> Dunno. Why don't you try it and tell us what happened?
>
> Thought I'd ask before breaking something!  OK, I'll add a dummy
> account, fiddle with that, and report back.

`adduser testdummy` produces the following in /etc/shadow:

testdummy:$1$ZEjx4cY0$Ky2RUfcpspgX5KAqtpSpO.:13414:0:99999:7:::
and status P

`passwd -l testdummy`

testdummy:!$1$ZEjx4cY0$Ky2RUfcpspgX5KAqtpSpO.:13414:0:99999:7:::
and status L

`passwd -u testdummy`

testdummy:$1$ZEjx4cY0$Ky2RUfcpspgX5KAqtpSpO.:13414:0:99999:7:::
and status P

passwd -d testdummy

testdummy::13414:0:99999:7:::
and status NP

`passwd -u testdummy` still says "Password changed." instead of giving a
warning, but it doesn't change it:

testdummy::13414:0:99999:7:::
and still status NP


(But I still find it curious that some of the locked (status L) system
accounts have "*" and some have "!" in the password field.)





More information about the ubuntu-users mailing list