I have found a bug and the developers to whom I reported this bug to want me to send them the VM with the bug. They want me to send them the password and the VM in its current state (a snapshot). I don't want to give them the password I currently have for the VM, instead I am going to change the password for the VM to something else, and I don't want them to be able to figure out what my old password was.

So if I change the sudo password and give them a snapshot of the machine, with access to the machine and the new password is there any way that they could determine the old password? The machine is an installation of Ubuntu GNOME 15.10 with GNOME 3.18 64-bit.

I'm basically just wanting to know if it is still stored somewhere or something, and whether I'd be safer just doing a fresh install with a password I don't mind giving away, or whether once the password is changed, the old one can't be recovered and thus it doesn't matter if I just send them a snapshot with a new password.

  • 1
    Which VM are you using? Ubuntu/Linux certainly does not store unencrypted passwords, but who knows what (keyboard) buffering you might have on an arbitrary VM. – ubfan1 Apr 1 '16 at 15:30
  • @ubfan1: I already specified that the VM is an installation of Ubuntu GNOME 15.10 with GNOME 3.18 64-bit. – user364819 Apr 1 '16 at 15:44
  • Qemu, VMware, virtbox,.... the virtual software, not the host is of interest too. – ubfan1 Apr 1 '16 at 16:04
  • @ubfan1: Well, you didn't make it clear what you meant, and as you immediately started talking about Ubuntu, I assumed you meant the OS. Anyway, it's Virtual Box. – user364819 Apr 1 '16 at 20:37

No, the password is only stored in /etc/shadow and, even there, it is stored salted hash. This means that even if they have the original password hash, it is very very hard to get the actual password from it. You would have to brute force it and, if it is even possible, it would take a long time and far more resources than anyone would be willing to expend just to get some random panda's password.

In any case, when you change your password, the entry in /etc/shadow is changed and no trace of the original password remains.

You should, perhaps, check through your shell's history and make sure you never entered the password in plain text there:

 history | grep yourPassword

You could also, for your peace of mind, run a full search on all files on the virtual drive:

 find / -type f -exec grep -l "yourPassword" {} +

Mind the space in front of the commands. That makes it so that the commands are NOT added to history.

  • 2
    And once you've run those commands, your password is definitely in your history. ;) – TRiG Apr 1 '16 at 16:05
  • @TRiG shhhhhhhhhhh! – terdon Apr 1 '16 at 16:06
  • There fixed it :-) – Rinzwind Apr 1 '16 at 18:10
  • @TRiG: Yes, I was thinking that... :D – user364819 Apr 1 '16 at 20:37
  • 1
    Remember that the file system is not required to write the new file to the same place on the virtual harddisk, leaving potential old versions of the shadow file behind – Ferrybig Apr 6 '16 at 16:23

You are better off creating a fresh VM, recreating the bug, then send that fresh copy to the developers, with nothing of value to you in what you send them. If you consider all the possible places you can get random text strings saved (shell history, auth.log, compressed logs, etc.), you will still have doubts that you thought of them all, or checked throughly enough.

example: Type your password when the username was expected, that gets saved in /var/log/auth.log, old auth.logs are compressed. What about other logins like ssh? Confident you got all the operating system places? Now consider what sort of logging the VM program may be doing. Far less work to start with a fresh, known clean VM, and duplicate the bug. Also, the developers will appreciate a known state (fresh install) which displays the bug.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy