JeOS sudo on login

Bug #409335 reported by heath on 2009-08-05
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
VMBuilder
Undecided
Unassigned
Ubuntu
Undecided
Unassigned

Bug Description

After installing a JeOS 9.04 system, /etc/bash.bashrc is called to locate /root/firstlogin_done, but /root is not world readable in JeOS 9.04 causing the script to always prompt for sudo.

/etc/bash.bashrc

#!/bin/sh -e
#execute firstlogin.sh only once
if [ ! -e /root/firstlogin_done ]; then
    if [ -e /root/firstlogin.sh ]; then
        /root/firstlogin.sh
    fi
    # This part should not be necessary any more
    # sudo dpkg-reconfigure -p critical console-setup &> /dev/null
    sudo touch /root/firstlogin_done
fi

The sudo command does create the file; however, the file can never be read due to the permissions on the /root dir being:

drwx------ 4 root root 4096 2009-06-27 17:42 root

In my 8.10 JeOS system the /root dir is world readable allowing the script to locate the file.

Matt Arnold (mattarnold5) wrote :

Converting to question doesn't sound like a bug

Changed in ubuntu:
status: New → Invalid
William King (quentusrex) wrote :

This IS a bug. The bug is that after EVERY login it requires sudo prompt.

The problem is that the method used for checking if it's first login is faulty. It should either check some way that doesn't require sudo, or it should remove the check after it proves it isn't first login.

Matt Arnold (mattarnold5) wrote :

Ok I'll convert back to a bug for now, is this a new install of jeOS or an upgrade

Changed in ubuntu:
status: Invalid → New
Matt Arnold (mattarnold5) wrote :

if i recall correctly /root is NOT world readable be design, and it sounds to me as though that code should run from init or some other place that runs with read permisson /root

William King (quentusrex) wrote :

I would agree. Is there a fix that I could test? I would like to stop needing to run a script on first run to remove the offending line.

I can test code if you have some.

Fabio Marconi (fabiomarconi) wrote :

Hello heath, William King

Still this problem existing in the latest updated Lucid's packages ?

Changed in ubuntu:
status: New → Incomplete
Fabio Marconi (fabiomarconi) wrote :

We'd like to figure out what's causing this bug for you, but we haven't heard back from you in a while. Could you please provide the requested information? Thanks!

Fabio Marconi (fabiomarconi) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to "New". Thanks again!

Changed in ubuntu:
status: Incomplete → Invalid
Jarl (jarl-dk) wrote :

It affects me. I have just run into this bug on a brand new oneiric JeOS created on a oneiric server host.

What information do you need?

Changed in ubuntu:
status: Invalid → Confirmed
Jarl (jarl-dk) on 2011-11-08
summary: - JeOS 9.04 sudo on login
+ JeOS sudo on login
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers