# mergemaster : mistakenly delete some users (messagebus),



## vaclinux (Dec 19, 2009)

Dear guys,
I need a help, i was upgrading my system form 7.2 to 8.0 using csup.
But mistakenly i dont pay attention to mergemaster when installing new configuration for the system.
I think i have deleted some user,
in dmesg there were a message that stated cant find UID and GUI for messagebus, then they cant start dbus,
and goes samething, i cant login to normal user account,
everything in /etc/passwd seems default.

I have backed up for the "/" slice partition, then i have manually edited passwd and group which referring to my backup /etc (old config files).

Does manually edit the config file could solve the problem,?
Because it didnt works for me
Thanks


----------



## mickey (Dec 19, 2009)

vaclinux said:
			
		

> But mistakenly i dont pay attention to mergemaster when installing new configuration for the system.
> I think i have deleted some user,
> in dmesg there were a message that stated cant find UID and GUI for messagebus, then they cant start dbus,
> and goes samething, i cant login to normal user account,
> everything in /etc/passwd seems default.



Looks like you had mergemaster toast your /etc/master.passwd file. When using mergemaster you need to pay close attention what files it is going to modify and decide whether you really want to let that happen.

Though I really never understood why mergemaster wants to install the default master.passwd each time.



			
				vaclinux said:
			
		

> I have backed up for the "/" slice partition, then i have manually edited passwd and group which referring to my backup /etc (old config files).



Which passwd file did you edit, and how exactly did you do that?

Normally you would use the vipw(8) command for editing the password database, which spawns your favourite $EDITOR for editing the password file, does some locking, and runs pwd_mkdb(8) afterwards in order to update the database style password databases.


----------



## Beastie (Dec 19, 2009)

Don't Panic! 

I guess it's a desktop and you only have 1 user, right? I wouldn't edit anything. It's not worth it in your case.

Your "biggest" problem here is your (non-existent) user account and the blank root's password.
You can set root's password like you did the first time. As for your user account, recreate it using adduser(8), keep the defaults, change the shell if you want, point it to your old home directory (probably the default) and enter a password.
dbus, hal and other users and groups are not important. You'll update/reinstall those ports and the users/groups should be recreated (if I'm not mistaken).


----------



## mickey (Dec 19, 2009)

Why all the fuzz, when the OP has a backup of his original passwd files?

Especially on desktop machines, you have lots of pseudo users for HAL, dbus, etc to function properly.


----------



## Beastie (Dec 19, 2009)

What I propose above takes 15 seconds to complete if you take your time, is easy and less error-prone than other methods, and avoids... the mess created by badly edited databases.
As for the other users/groups, they'll be recreated automatically when the user installs the newer versions of the software.


----------



## vaclinux (Dec 19, 2009)

Beastie said:
			
		

> What I propose above takes 15 seconds to complete if you take your time, is easy and less error-prone than other methods, and avoids... the mess created by badly edited databases.
> As for the other users/groups, they'll be recreated automatically when the user installs the newer versions of the software.



I think i got your point,
I could reinstall the software to get dbus work,

But for the normal user, i just dont want to recreate, i want to use the old normal user not the new 'one'. 

@ mickey,
May be mickey way, is the one that i expect, sort of modify the config file, to get other account works.
i will try the method, 'vipm'

Oh ya, for your information, previously , I was modified normaly, by adding some lines to /etc/passwd, /etc/group /etc/master.passwd. 
Additional lines are found in my backup config file,
And i never run pwd_mkdb.


----------



## vaclinux (Dec 19, 2009)

It is solved,just by running 

```
pwd_mkdb /etc/master.passwd
```


----------



## Beastie (Dec 19, 2009)

vaclinux said:
			
		

> But for the normal user, i just dont want to recreate, i want to use the old normal user not the new 'one'.


Did I mention that all it'll do is re-add the few appropriate lines to the appropriate files, that your "old" user's home directory will be left untouched and that if you keep the same username and UID no one will be able to tell the difference?


----------

