Lost some of account rights

OOzy Pal oozypal at gmail.com
Sun Apr 29 05:08:10 UTC 2007


On 4/29/07, Patton Echols <p.echols at comcast.net> wrote:
> On 04/28/2007 02:20 PM, Rashkae wrote:
> > Patton Echols wrote:
> >
> >> On 04/28/2007 11:48 AM, OOzy Pal wrote:
> >>
> >>> I was trying to add me login name to group www-data so I did
> >>>
> >>> usermod -g www-data hab
> >>> usermod -G www-data hab
> >>>
> >>> now, I lost my system menu. When I click on System I see only limited
> >>> items. How can I re-gain my right.
> >>>
> >>>
> >>>
> >> FWIW, I'm pretty much a noob, but reading some man pages . . .:
> >>
> >> It looks like the problem is the use of the "-G" option.  The man page
> >> says that, if you don't list all your existing groups, then "usermod -G"
> >> will remove the user from any groups not listed.  So to add yourself
> >> back, you need to list all of the groups you should belong to.
> >>
> >> Here is the section from man usermod
> >> "
> >>    -G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
> >>           A list of supplementary groups which the user is also a member of.
> >>           Each group is separated from the next by a comma, with no
> >>           intervening whitespace. The groups are subject to the same
> >>           restrictions as the group given with the -g option. If the user is
> >>           currently a member of a group which is not listed, the user
> >> will be
> >>           removed from the group. This behaviour can be changed via -a
> >> option,
> >>           which appends user to the current supplementary group list.
> >>
> >> "
> >>
> >> And here is the output on my system of "grep patton /etc/group"
> >>
> >> adm:x:4:patton
> >> dialout:x:20:cupsys,patton
> >> cdrom:x:24:haldaemon,patton
> >> floppy:x:25:haldaemon,patton
> >> audio:x:29:patton
> >> dip:x:30:patton
> >> video:x:44:patton
> >> plugdev:x:46:haldaemon,patton
> >> lpadmin:x:109:patton
> >> scanner:x:111:cupsys,hplip,patton
> >> patton:x:1000:
> >> admin:x:114:patton
> >>
> >> If my system is typical, then you would want to do:
> >>
> >> usermod -G
> >> adm,dialout,cdrom,floppy,audio,dip,video,plugdev,lpadmin,scanner,hab,admin
> >>
> >> WARNING:  man usermod also says that the groups must exist.  Check to be
> >> sure before you do this.
> >>
> >> Better yet, see if someone who really knows can give you a better answer.
> >>
> >> GL
> >>
> >>
> >
> >
> > Unfortunately, with the -G option that was used, the only admin account
> > (which gives you right to sudo) was nuked.
> >
> > You'll have to reboot into a root shell and add yourself to the admin
> > group from there. (Sorry, I don't remember how Ubuntu boot menu is setup
> > by default, and can't verify atm)
> >
> IIRC it is the "recovery" option in the grub menu
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

Thank you all, I did booted into recovery mode and I edited
/etc/group. Then I added my name to admin group.

-- 
OOzy
Ubuntu-Feisty




More information about the ubuntu-users mailing list