[users-admin] Changing anything about the root account sets and invalid home directory

Bug #198172 reported by Corinne Toure
28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GST
Fix Released
High
Nominated for Head by Pavan Tulluri
gnome-system-tools (Debian)
Fix Released
Unknown
gnome-system-tools (Ubuntu)
Fix Released
High
Ubuntu Desktop Bugs

Bug Description

Hi,

When the user uses users-admin to edit anythin to
do with the root account the root home directory is
set to /home/root/. This makes tools like synaptic
unable to open.

The problem is that the preferences window uses
a profile from /etc/gnome-system-tools/users/profiles
to set certain default values. For the root account it
is the "Administrator" type, which says that the
home folder should live under /home/

This means that /home/root is then filled in as the default
value of the Advanced tab for the root user. Therefore
if the user makes any change and presses "OK" (or perhaps
on no change) the home directory for the root account is
set to the wrong value.

I think that this is fine behaviour for new accounts, but for
existing accounts these fields shouldn't be set to the
default value, but to the current existing value, which
would mean that clicking OK would only set the value
to the same as it was before.

The original report remains below.

Thanks,

James

-------

After I installed the last update today, I keep receiving this error message when I try to open the Synoptic Package Manager:
E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

Revision history for this message
James Westby (james-w) wrote :

Hi Corrine,

Can you confirm that you were launching synaptic from
the menu please?

My first guess is this is something to do with sudo environment
changes.

Thanks,

James

Revision history for this message
teacher006 (terry-dean) wrote :

I also am getting the same error message but mine is coming when I try to install my updates. So at this time I'm not able to install any updates at all. I am pretty much a newbie so my terminal skills are limited. I did try to make the directory using the terminal under "su" but was unsuccessful. Now I'm lost as to what to do.

Any help here would also be appreciated.

Terry

Revision history for this message
James Westby (james-w) wrote :

Hi,

Can someone with this problem please go to

System->Administration->Users and Groups

then click on the "root" user, and click properties
(you may have to use the "unlock" first if you
are on hardy). Then choose the Advanced
tab, and see what it says in "Home directory".

Thanks,

James

Revision history for this message
santy19 (santoshonline) wrote :

Hi James,

It says /home/root

Let me know the solution when you have one.

Thank,

Santosh

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 198172] Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

On Sun, 2008-03-16 at 20:10 +0000, santy19 wrote:
> Hi James,
>
> It says /home/root
>
> Let me know the solution when you have one.

Hi,

can you try changing that to /root and
trying to run synaptic again please?

Thanks,

James

Revision history for this message
santy19 (santoshonline) wrote : Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

It worked. My synaptic package manager is working properly.

Sorry I am a complete n00b here. I can now see that all it was looking for was the correct path for the particular file.

Thank,

Santosh

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 198172] Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

On Sun, 2008-03-16 at 22:43 +0000, santy19 wrote:
> It worked. My synaptic package manager is working properly.
>
> Sorry I am a complete n00b here. I can now see that all it was looking
> for was the correct path for the particular file.

Hi,

I'm glad it works for you.

However my machine also has /home/root there, and it works,
so i wonder what the difference is that makes yours not.

It's late here, so I don't have time to think about it now,
but I hope to soon.

Thanks,

James

Revision history for this message
santy19 (santoshonline) wrote : Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

To tell you the truth, today is the first time I am managing Ubuntu or any linux. I just installed this today on my spare desktop out of curiosity.
One thing I can think of is that while installing, it did ask me where I wanted the root ( or similar question). And i just clicked "something" because I dont know anything of linux.

I think that while we do the update the synaptic overwrites the user setting.

Please post if you find anything.

Thanks,

Santosh

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 198172] Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

On Sun, 2008-03-16 at 23:45 +0000, santy19 wrote:
> To tell you the truth, today is the first time I am managing Ubuntu or any linux. I just installed this today on my spare desktop out of curiosity.

Hey, congratulations :)

> One thing I can think of is that while installing, it did ask me where I wanted the root ( or similar question). And i just clicked "something" because I dont know anything of linux.

That's interesting, I don't remember seeing that. Did you used the
normal installer, or the "alternate" one? Did you run in expert mode?

(The normal installer is the one that runs from the live cd, the
alternate is a different cd, and doesn't give you a desktop before
installing)

>
> I think that while we do the update the synaptic overwrites the user
> setting.

That's also odd.

>
> Please post if you find anything.

So, I do indeed have /home/root in the edit window of user settings
tool. However, it instead says just /root/ on the main settings window
itself. I am trying to look where this difference comes from, as that
may be the key here.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote : Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

Hi,

I need someone else who is experiencing this problem, and who
has not tried to edit the setting above, to tell me what the home
directory is given as in the row for root in System->Administration
->Users and Groups.

If that is indeed /home/root then we need to work out how it became
that way.

I have looked further in to it and the text box in the Properties
says /home/root as that is just a default, it doesn't mean that
is what the real home directory is.

Thanks,

James

Revision history for this message
StiveG (stive-z) wrote :

Hi,

I did have the same problem this morning on Hardy... Changed /home/root to /root and it worked

Yesterday I had problem with my root user, had an expire account notice when trying to run terminal as root. I defined a password manually in user-groups and the expiration notice disappeared... Maybe that changed the /home/root path?

Steve

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 198172] Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

On Tue, 2008-03-18 at 12:41 +0000, StiveG wrote:
> Hi,
>
> I did have the same problem this morning on Hardy... Changed /home/root
> to /root and it worked
>
> Yesterday I had problem with my root user, had an expire account notice
> when trying to run terminal as root. I defined a password manually in
> user-groups and the expiration notice disappeared... Maybe that changed
> the /home/root path?

Yes, that may well have caused it, thankyou for the information.

I'll do some testing and reassign the bug report if that is correct.

Thanks,

James

Revision history for this message
James Westby (james-w) wrote : Re: E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

Hi,

I think I have the reason for this problem, I am
reassigning the bug to the appropriate package.

I will also edit the description to make it more specific
what the problem is.

Thanks,

James

James Westby (james-w)
description: updated
Changed in gnome-system-tools:
assignee: nobody → desktop-bugs
importance: Undecided → High
milestone: none → ubuntu-8.04
Revision history for this message
Pedro Villavicencio (pedro) wrote :

I've sent this upstream at: http://bugzilla.gnome.org/show_bug.cgi?id=523180 ; thanks for reporting.

Changed in gnome-system-tools:
status: Confirmed → Triaged
Changed in gst:
status: Unknown → New
Revision history for this message
exogenetic (exogenetic) wrote :

I just changed my root account password and got the same error today.

I might note that I had NO PROBLEM using "sudo apt-get update" then "sudo apt-get install"
That worked fine and was done immediately after the problem was detected.

Since this is not a production machine, and I don't really care if I have to use the terminal, I'm going to leave it alone and help test any bug fixes done on the related packages.

Copy and paste my matching error message:
E: ERROR: could not create configuration directory /home/root/.synaptic - mkdir (2 No such file or directory)

Revision history for this message
James Westby (james-w) wrote :

Hi,

This bug is a lot simpler to fix than what my first attempts
were trying to do. The fix is attached.

By way of explanation, as it's not completely obvious I
include the main part here.

+--- gnome-system-tools-2.22.0~/src/users/user-settings.c 2008-03-31 16:32:35.000000000 +0100
++++ gnome-system-tools-2.22.0/src/users/user-settings.c 2008-03-31 16:32:36.000000000 +0100
+@@ -347,9 +347,6 @@
+ widget = gst_dialog_get_widget (tool->main_dialog, "user_settings_shell");
+ set_entry_text (GTK_BIN (widget)->child, oobs_user_get_shell (user));
+
+- widget = gst_dialog_get_widget (tool->main_dialog, "user_settings_home");
+- set_entry_text (widget, oobs_user_get_home_directory (user));
+-
+ widget = gst_dialog_get_widget (tool->main_dialog, "user_settings_uid");
+ gtk_spin_button_set_value (GTK_SPIN_BUTTON (widget), oobs_user_get_uid (user));
+ gtk_widget_set_sensitive (GTK_SPIN_BUTTON (widget), FALSE);

Here's where the code used to set the home dir for existing users.

+@@ -394,6 +391,11 @@
+ if (!login)
+ table_set_default_profile (GST_USERS_TOOL (tool));
+

However this eventually sets the default home dir prefix
for the user's profile, and then calls the callback to
update that based on the user's name. This then overwrote
the value we set above.

It is exactly the right thing to do if the user didn't exist
on the system yet, i.e. user == NULL.

++ if (user) {
++ widget = gst_dialog_get_widget (tool->main_dialog, "user_settings_home");
++ set_entry_text (widget, oobs_user_get_home_directory (user));
++ }

So, we just add this right after, which is taking the code above and
moving it below this, with the same guard. This means that
we still set the user's home directory if they already exist, we just do
it later so that it is not overwritten.

I have tested this and found

  * It shows both mine and the root account's home
     dir correctly, where only mine was shown before.

  * It uses the default prefix from the user's profile
     when creating a user, and updates the homedir
     as you type in the username, which is the same
     behaviour as before.

Thanks,

James

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gnome-system-tools - 2.22.0-0ubuntu5

---------------
gnome-system-tools (2.22.0-0ubuntu5) hardy; urgency=low

  * If a user already exists then set the home directory text box
    to display their home directory, rather than the default for their
    profile. This avoids changing the homedir inadvertantly when
    a user's homedir isn't the default for their profile, in
    particular the root user on Ubuntu. (LP: #198172)

 -- James Westby <email address hidden> Mon, 31 Mar 2008 13:10:26 +0100

Changed in gnome-system-tools:
status: Triaged → Fix Released
Changed in gst:
status: New → Confirmed
Changed in gnome-system-tools:
status: Unknown → New
Changed in gst:
importance: Unknown → High
status: Confirmed → Fix Released
Changed in gnome-system-tools (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.