All of lore.kernel.org
 help / color / mirror / Atom feed
* passwd and USER_CHAUTHTOK
@ 2017-08-30  7:56 Maupertuis Philippe
  2017-08-30 14:22 ` Steve Grubb
  0 siblings, 1 reply; 3+ messages in thread
From: Maupertuis Philippe @ 2017-08-30  7:56 UTC (permalink / raw)
  To: linux-audit


[-- Attachment #1.1: Type: text/plain, Size: 2973 bytes --]

Hi
On a new redhat 7.4, passwd -S to check the status of a user generates the following event  :
node=xxxxx type=USER_CHAUTHTOK msg=audit(28/08/17 16:34:18.632:54145) : pid=31134 uid=root auid=xxxxx ses=3866 msg='op=password status displayed for user id=ftp exe=/usr/bin/passwd hostname= xxxxx addr=? terminal=pts/1 res=success'

According to https://github.com/linux-audit/audit-documentation/wiki/SPEC-User-Account-Lifecycle-Events  USER_CHAUTHTOK means that the user  has successfully changed his password.
In that case no change were done, only a query as it appears in the msg field

The text format is even more disturbing :
On xxxxx at 16:34:18 28/08/17 xxxxx, acting as root, successfully changed-password using /usr/bin/passwd
The real action and the target user (ftp) is entirely lost in the text format.

I would say that this message should not have been generated in the first place.

If I really change a user password  by passwd games , I get :
node=xxxxx type=USER_CHAUTHTOK msg=audit(28/08/17 17:04:36.683:54299) : pid=774 uid=root auid=xxxxx ses=3866 msg='op=change password id=games exe=/usr/bin/passwd hostname=xxxxx addr=? terminal=pts/1 res=success'
and in the text format :
On xxxxx at 17:04:36 28/08/17 xxxxx, acting as root, successfully changed-password games using /usr/bin/passwd
On xxxxx at 17:04:36 28/08/17 xxxxx, acting as root, successfully changed-password using /usr/bin/passwd
This time the first line describes accurately what happened but I find the second one misleading since it is really the same command and not an additional change.

Please let me know if I missed something.
Philippe




!!!*************************************************************************************
"Ce message et les pi?ces jointes sont confidentiels et r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre prot?g? par le secret professionnel. Si vous recevez ce message par erreur, merci d'en avertir imm?diatement l'exp?diteur et de le d?truire. L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la responsabilit? de Worldline ne pourra ?tre recherch?e quant au contenu de ce message. Bien que les meilleurs efforts soient faits pour maintenir cette transmission exempte de tout virus, l'exp?diteur ne donne aucune garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour tout dommage r?sultant d'un virus transmis.

This e-mail and the documents attached are confidential and intended solely for the addressee; it may also be privileged. If you receive this e-mail in error, please notify the sender immediately and destroy it. As its integrity cannot be secured on the Internet, the Worldline liability cannot be triggered for the message content. Although the sender endeavours to maintain a computer virus-free network, the sender does not warrant that this transmission is virus-free and will not be liable for any damages resulting from any virus transmitted.!!!"

[-- Attachment #1.2: Type: text/html, Size: 6547 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: passwd and USER_CHAUTHTOK
  2017-08-30  7:56 passwd and USER_CHAUTHTOK Maupertuis Philippe
@ 2017-08-30 14:22 ` Steve Grubb
  2017-08-30 19:02   ` Steve Grubb
  0 siblings, 1 reply; 3+ messages in thread
From: Steve Grubb @ 2017-08-30 14:22 UTC (permalink / raw)
  To: linux-audit; +Cc: Maupertuis Philippe

Hello Philippe,

Thanks for reporting this (and the other bug which is in my queue to work on).

On Wednesday, August 30, 2017 3:56:10 AM EDT Maupertuis Philippe wrote:
> Hi
> On a new redhat 7.4, passwd -S to check the status of a user generates the
> following event  : node=xxxxx type=USER_CHAUTHTOK msg=audit(28/08/17
> 16:34:18.632:54145) : pid=31134 uid=root auid=xxxxx ses=3866
> msg='op=password status displayed for user id=ftp exe=/usr/bin/passwd
> hostname= xxxxx addr=? terminal=pts/1 res=success'
> 
> According to
> https://github.com/linux-audit/audit-documentation/wiki/SPEC-User-Account-L
> ifecycle-Events  USER_CHAUTHTOK means that the user  has successfully
> changed his password. In that case no change were done, only a query as it
> appears in the msg field
> 
> The text format is even more disturbing :
> On xxxxx at 16:34:18 28/08/17 xxxxx, acting as root, successfully
> changed-password using /usr/bin/passwd The real action and the target user
> (ftp) is entirely lost in the text format.
> 
> I would say that this message should not have been generated in the first
> place.

I would agree. I'll make a patch to remove it.

I looked around the auditing in passwd and it looks like it has not been 
updated as everything else has been to eliminate dangling text. So, it's 
wholly unsuited as is for text format output. I'll make a second patch to 
update the auditing to modern standards. Its probably not been touched in a 
decade.

-Steve

> If I really change a user password  by passwd games , I get :
> node=xxxxx type=USER_CHAUTHTOK msg=audit(28/08/17 17:04:36.683:54299) :
> pid=774 uid=root auid=xxxxx ses=3866 msg='op=change password id=games
> exe=/usr/bin/passwd hostname=xxxxx addr=? terminal=pts/1 res=success' and
> in the text format :
> On xxxxx at 17:04:36 28/08/17 xxxxx, acting as root, successfully
> changed-password games using /usr/bin/passwd On xxxxx at 17:04:36 28/08/17
> xxxxx, acting as root, successfully changed-password using /usr/bin/passwd
> This time the first line describes accurately what happened but I find the
> second one misleading since it is really the same command and not an
> additional change.
> 
> Please let me know if I missed something.
> Philippe
> 
> 
> 
> 
> !!!*************************************************************************
> ************ "Ce message et les pi?ces jointes sont confidentiels et
> r?serv?s ? l'usage exclusif de ses destinataires. Il peut ?galement ?tre
> prot?g? par le secret professionnel. Si vous recevez ce message par erreur,
> merci d'en avertir imm?diatement l'exp?diteur et de le d?truire.
> L'int?grit? du message ne pouvant ?tre assur?e sur Internet, la
> responsabilit? de Worldline ne pourra ?tre recherch?e quant au contenu de
> ce message. Bien que les meilleurs efforts soient faits pour maintenir
> cette transmission exempte de tout virus, l'exp?diteur ne donne aucune
> garantie ? cet ?gard et sa responsabilit? ne saurait ?tre recherch?e pour
> tout dommage r?sultant d'un virus transmis.
> 
> This e-mail and the documents attached are confidential and intended solely
> for the addressee; it may also be privileged. If you receive this e-mail in
> error, please notify the sender immediately and destroy it. As its
> integrity cannot be secured on the Internet, the Worldline liability cannot
> be triggered for the message content. Although the sender endeavours to
> maintain a computer virus-free network, the sender does not warrant that
> this transmission is virus-free and will not be liable for any damages
> resulting from any virus transmitted.!!!"

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: passwd and USER_CHAUTHTOK
  2017-08-30 14:22 ` Steve Grubb
@ 2017-08-30 19:02   ` Steve Grubb
  0 siblings, 0 replies; 3+ messages in thread
From: Steve Grubb @ 2017-08-30 19:02 UTC (permalink / raw)
  To: linux-audit; +Cc: Maupertuis Philippe

On Wednesday, August 30, 2017 10:22:43 AM EDT Steve Grubb wrote:
> Hello Philippe,
> 
> Thanks for reporting this (and the other bug which is in my queue to work
> on).
> On Wednesday, August 30, 2017 3:56:10 AM EDT Maupertuis Philippe wrote:
> > Hi
> > On a new redhat 7.4, passwd -S to check the status of a user generates the
> > following event  : node=xxxxx type=USER_CHAUTHTOK msg=audit(28/08/17
> > 16:34:18.632:54145) : pid=31134 uid=root auid=xxxxx ses=3866
> > msg='op=password status displayed for user id=ftp exe=/usr/bin/passwd
> > hostname= xxxxx addr=? terminal=pts/1 res=success'
> > 
> > According to
> > https://github.com/linux-audit/audit-documentation/wiki/SPEC-User-Account-
> > L
> > ifecycle-Events  USER_CHAUTHTOK means that the user  has successfully
> > changed his password. In that case no change were done, only a query as it
> > appears in the msg field
> > 
> > The text format is even more disturbing :
> > On xxxxx at 16:34:18 28/08/17 xxxxx, acting as root, successfully
> > changed-password using /usr/bin/passwd The real action and the target user
> > (ftp) is entirely lost in the text format.
> > 
> > I would say that this message should not have been generated in the first
> > place.
> 
> I would agree. I'll make a patch to remove it.

In case anyone wants this update to passwd, it is here:

https://pagure.io/passwd/c/c461efa0b6f9134adbb1440bb8cef2d3bf81620d?branch=master


> I looked around the auditing in passwd and it looks like it has not been
> updated as everything else has been to eliminate dangling text. So, it's
> wholly unsuited as is for text format output. I'll make a second patch to
> update the auditing to modern standards. Its probably not been touched in a
> decade.

And the other audit cleanups here:

https://pagure.io/passwd/c/d02e152112b28717eece1d64027a325439968e9f?branch=master

https://pagure.io/passwd/c/137db0d6f2fd668081133c172ae7726d28ce95b6?branch=master

-Steve

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-30 19:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-30  7:56 passwd and USER_CHAUTHTOK Maupertuis Philippe
2017-08-30 14:22 ` Steve Grubb
2017-08-30 19:02   ` Steve Grubb

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.