Comment 0 for bug 1188820

Revision history for this message
Scott Moser (smoser) wrote :

inside an azure instance:

$ ls -altr /etc/shadow
---------- 1 root root 902 Jun 7 20:23 /etc/shadow

/usr/sbin/waagent has:
def DeleteRootPassword():
    filepath="/etc/shadow"
    ReplaceFileContentsAtomic(filepath, "root:*LOCK*:14600::::::\n" + "\n".join(filter(lambda a: not
        a.startswith("root:"),
        GetFileContents(filepath).split('\n'))))
    os.chmod(filepath, 0000)
    if IsRedHat():
        Run("chcon system_u:object_r:shadow_t:s0 " + filepath)
    Log("Root password deleted.")

more correct permissions on that file would be:
$ ls -altr /etc/shadow
-rw-r----- 1 root shadow 1497 May 29 16:51 /etc/shadow

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: walinuxagent 1.3.2-0ubuntu1 [modified: usr/sbin/waagent]
ProcVersionSignature: Ubuntu 3.8.0-23.34-generic 3.8.11
Uname: Linux 3.8.0-23-generic x86_64
ApportVersion: 2.9.2-0ubuntu8
Architecture: amd64
Date: Fri Jun 7 20:32:03 2013
MarkForUpload: True
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: walinuxagent
UpgradeStatus: No upgrade log present (probably fresh install)