How to delete an old (root) account on Ubuntu safely?

0

I have a user account with root access in my Ubuntu with username "A". For some reason, I created another account sometime back for myself named "B" and gave this account root access as well. Now, I don't use the old account at all, but at times when I'm using my account B, I put in password of A like when I'm connecting to a wifi network in network manager. (I know both passwords, so that's not a problem). Now, when I look at home folder of A and see that it has occupied a big chunk of space on my hard disk, I'm compelled to delete it.

Considering that some operations being done in B require password of A, so My question is how do I safely delete the old account? Is there a way by which I can assign all the privileges of A to B, and be assured that deleting A won't mess up with the account B.

PS: atm, I'm backing up my ubuntu and will delete the user A with its home folder, have backed up the whole system just in case.

Atul Goyal

Posted 2011-12-06T08:36:51.563

Reputation: 307

I am not getting your question, but you can just do userdel -r A from root account. – Sachin Divekar – 2011-12-06T08:48:31.010

@Sachin If I do that, what will happen when I access network manager in "B" which requires password of A? – Atul Goyal – 2011-12-06T08:50:14.940

I am not getting why "B" requires password of A to access network manager. Is it something related to gnome-keyring then google for keywords ubuntu gnome keyring change password. – Sachin Divekar – 2011-12-06T08:52:04.157

Ok, I should mention that I'm using Kubuntu and not Ubuntu, just used Ubuntu with my question as usually people are more familiar with Ubuntu and generally the solutions to problems are common for both. Sorry about the confusion. Regarding why B requires pwd of A, I have no idea. Should I just try deleting A and see what happens? – Atul Goyal – 2011-12-06T08:55:53.553

It should work but still I would suggest changing gnome keyring password. Test new password while accessing network manager. If successful then delete the user. Its just 5 minutest job. – Sachin Divekar – 2011-12-06T08:58:45.997

gnome keyring password is applicable for Kubuntu as well? Shouldn't it be something else as the environment is KDE. Does it have something to do with KDE wallet? – Atul Goyal – 2011-12-06T09:05:26.717

oh sorry, my bad. I think it is kde-wallet or kwallet. You disable or change this password using KDE Wallet manager. You can get tons of links from google on how to do it. – Sachin Divekar – 2011-12-06T09:11:59.607

If it is solved, I will post it as an answer. – Sachin Divekar – 2011-12-06T09:29:46.480

@Sachin yes it was about kwallet, and I changed password by going to kwallet. You can post it as an answer otherwise I was about to post myself. Post it and I'll accept. :) – Atul Goyal – 2011-12-06T12:40:54.510

Answers

0

Carrying out operations as "B" never requires the password of "A".

The only likely scenario is that the actual root user is enabled and has the same password as "A" and you are use kdesu which is prompting you for the root password.

It is easy to test this. Go to a command prompt, and do

sudo passwd A

and enter a password. Then

sudo passwd root

and enter a different password.

Now as "B" try an operation where you would enter the password for "A". If this does not work and the root password does, then the above is true.

If this doesn't work, and the password for A is accepted, then check /etc/passwd. It is possible you have somehow changed the username for the root account. It should look like this (UID 0 - the entry with 0 in the third field is the root account):

root:x:0:0:root:/root:/bin/bash

Paul

Posted 2011-12-06T08:36:51.563

Reputation: 52 173