LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   I lost all my privilages [Kubuntu] [usermod] (https://www.linuxquestions.org/questions/linux-newbie-8/i-lost-all-my-privilages-%5Bkubuntu%5D-%5Busermod%5D-563296/)

Four 06-20-2007 04:37 PM

I lost all my privilages [Kubuntu] [usermod]
 
I was using the usermod to add a group to myself. according to

http://www.ahinc.com/linux101/users....xisting%20user

Quote:

usermod - Modifying existing user

Options:

* -d home directory
* -s starting program (shell)
* -p password
* -g (primary group assigned to the users)
* -G (Other groups the user belongs to)

Example: To add the group 'others' to the user roger
usermod -Gothers roger
Yes I tryed that

sudo usermod -Gwww-data myuser

and now the only group I'm in is www-data. I can't even sudo it back to normal.

Is there anything I may do? root is disabled.

Thank you!

custangro 06-20-2007 05:00 PM

You can boot into single user mode...or you can sudo to su (this has worked for me at times):

Code:

sudo su -
it will prompt you for your users password.

Four 06-20-2007 07:01 PM

I tryed sudo su however that didn't work. What I did is just insert the ubuntu CD and boot from CD. Go into the file system on the hardrive and open

sudo vim /etc/group

then just add myself to the proper groups. Restart and groups are back to normal yay :).

the format of the groups is as follows

group_name:x:group_number:user1,user2 ....
here is an example
www:x:1003:pika,flap
where pika and flap are supposdably real names and part of the group www. I don't know whats with the x its just there.

and that website above should be updated. since the users are not added but set.


All times are GMT -5. The time now is 07:58 PM.