I was trying to create new user on my machine but some how i create a new user but i commited a mistake. That is while making a new accout i forget to make it acive by giving password. And then i make this new account as Administrator and make my old account as Desktop User. Now the old_account can’t run ’sudo’ command in and i don’t have access to my admin account.Everytime while running a sudo command it give me the error as shown below:
old_user~$sudo -s
your account is not in sudoers list So this event will be reported.
And further in Ubuntu you have root account but it not by default active in there you can switch to the root by typing:
old_user$su - or old_user$sudo -s
But will ask for root password which is not activated yet.
In this situtation i found a solution which can be done by editing sudoers list or group list file stored in /etc/sudoers ,/etc/group but to edit you require root access or sudo access. Which i lost it. Now to come out safe from this fishy situation take the following step:
1. Boot the system with any Ubuntu live cd login as ubuntu now.
2.The password for Ubuntu user is blank and it is also added to sudoers list so now you can run sudo command:
ubuntu~$sudo -s root~$
You are logged in as root.
3. Now type the following command in order:
root~$cd /media/(some long name of you actual installation folder)/etc/ root-.......etc/~$chmod 777 group root-.......etc/~$vi group
Now i put the old_username in in front of sudo option like :
sudo:x:27:old_username
And save this file.
Now the old_user can run sudo command ![]()
I restarted my system and run the following commands
old_user~$sudo -s enter password of old user: root~$adduser old_user admin
Now old_user become the part of the admin group can perform any sudo,and admin opearation.Hurray !:)
The comment and any suggestion of doing this in a better way are always welcomed.
It helps me hope this helps you cheers! ![]()
Thanks
Anuj Aneja
Inelligrape Software

