Bug 1248837
| Summary: | cloud-init log file should log user creation and password updating action | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Julie <juwu> | ||||
| Component: | cloud-init | Assignee: | Lars Kellogg-Stedman <lars> | ||||
| Status: | CLOSED NOTABUG | QA Contact: | |||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.0 | CC: | ecohen, gklein, juwu, lpeer, lsurette, michal.skrivanek, ofrenkel, rbalakri, Rhev-m-bugs, yeylon | ||||
| Target Milestone: | pre-dev-freeze | ||||||
| Target Release: | --- | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2015-08-04 17:23:23 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
Julie
2015-07-30 23:51:12 UTC
Created attachment 1057870 [details]
Cloud_init_log
Did not log user creating and updating password
Sounds like a bug in cloud-init, and not in RHEV-M. Setting as "virt" to get a formal answer about that. indeed, cloud init log is owned by cloud init, moving. Julie, could you provide the guest os version and cloud-init version? (In reply to Omer Frenkel from comment #3) > indeed, cloud init log is owned by cloud init, moving. > > Julie, could you provide the guest os version and cloud-init version? [test@cloud-init1 ~]$ cat /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 (Santiago) [test@cloud-init1 ~]$ rpm -qa cloud-init cloud-init-0.7.5-2.el6.x86_64 Cheers, Julie cloud-init already logs this information. It may not show up in /var/log/cloud-init.log, but it's available in the system journal.
Using this input:
#cloud-config
users:
- default
- name: lars
gecos: Lars Kellogg-Stedman
plain_txt_passwd: secret
I see this in the journal:
# journalctl | grep lars
Aug 04 12:22:55 citest.localdomain cloud-init[470]: [CLOUDINIT] __init__.py[DEBUG]: Adding user lars
Aug 04 12:22:55 citest.localdomain cloud-init[470]: [CLOUDINIT] util.py[DEBUG]: Running hidden command to protect sensitive input/output logstring: ['useradd', 'lars', '--comment', 'Lars Kellogg-Stedman', '-m']
Aug 04 12:22:55 citest.localdomain useradd[3349]: new group: name=lars, GID=1000
Aug 04 12:22:55 citest.localdomain useradd[3349]: new user: name=lars, UID=1000, GID=1000, home=/home/lars, shell=/bin/bash
Aug 04 12:22:56 citest.localdomain cloud-init[470]: [CLOUDINIT] util.py[DEBUG]: Running command ['passwd', '-l', 'lars'] with allowed return codes [0] (shell=False, capture=True)
Aug 04 12:22:58 citest.localdomain cloud-init[3614]: ci-info: no authorized ssh keys fingerprints found for user lars.
[root@citest ~]# grep lars /var/log/cloud-init.log
Aug 4 12:22:58 localhost cloud-init: ci-info: no authorized ssh keys fingerprints found for user lars.
Note that in the above we see both output from cloud-init itself as well as from the 'useradd' command, which also generates log entries when creating new users and groups.
For systems not running journald, these messages should be available in the system log, typically '/var/log/messages'.
Note that for password changes with an existing account, I see: Aug 04 13:29:28 citest.localdomain cloud-init[476]: [CLOUDINIT] __init__.py[INFO]: User operator already exists, skipping. Aug 04 13:29:28 citest.localdomain cloud-init[476]: [CLOUDINIT] util.py[DEBUG]: Running command ['passwd', '-l', 'operator'] with allowed return codes [0] (shell=False, capture=True) |