firstlogin script fails because /root is not readable in new VMs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
VMBuilder |
Confirmed
|
Low
|
Unassigned |
Bug Description
Since upgrading to Jaunty, newly-created VMs have /root set 0700 (which is probably correct). However, /etc/bash.bashrc assumes that the current user has read access to /root/firstlogi
STR:
1. cat > firstlogin.sh
echo "Hello, world!"
^D
and chmod +x firstlogin.sh
2. sudo vmbuilder kvm ubuntu --suite jaunty --flavour virtual --firstlogin= firstlogin.sh --addpkg=
3. Boot and log into the new VM.
Expected:
"Hello, world!" is printed on the first login, and subsequent logins do nothing.
Actual:
"Hello, world!" is never printed on login.
Every login prompts for the sudo password (for 'sudo touch /root/firstlogi
Changed in vmbuilder: | |
status: | New → Confirmed |
Changed in vmbuilder: | |
importance: | Undecided → Low |
The main problem here is that the vmbuilder script assumes that the first user who logs in will be root. While thinking about how to solve this problem, I realized that vmbuilder's --help is a little ambiguous:
--firstlogi n=PATH Specify a script that will be copied into the guest
and will be executed the first time the user logs in.
This script can be interactive.
I have the following questions:
1) What does it mean by "the user"? The user defined in --user? Any user? Root?
2) Or does it mean "a user", which would mean the script should be invoked the first time _any_ user logs in. As in, not the first login per-machine, but the first login per-user. Due to permission issues, I do believe that this would actually be easier to implement.
Thoughts?