Results 1 to 4 of 4

Thread: sudo usermod -G root garyisaStupidUser

  1. #1
    Join Date
    Nov 2008
    Location
    Boston
    Beans
    50
    Distro
    Ubuntu

    sudo usermod -G root garyisaStupidUser

    Objective: make it easy for username to edit LAMP system files
    Approach : sudo usermod -G root username

    in an attemp to give username root priveleges
    instead,

    I can't sudo, becasue its says authentication failure
    not in sudoers file
    I can't SU for the same reason

    my passwd shows this
    username:1000:1000:username,,,:/home/username:/bin/bash

    I can't figure out how to login as root

    Anyway out of this?

    my swag is
    usermod -G root username
    changed my group?
    but did not give me ownership of files, so i still can't edit what I want
    I wrote my first shell script in 5 minutes, it took me a day to figure out you needed to put a . in front of it to get it to execute.

  2. #2
    Join Date
    Feb 2007
    Location
    Romania
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: sudo usermod -G root garyisaStupidUser

    Boot into recovery mode and add your user to the admin or sudo group:
    http://psychocats.net/ubuntu/fixsudo

  3. #3
    Join Date
    Nov 2007
    Location
    NC, USA
    Beans
    829
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: sudo usermod -G root garyisaStupidUser

    Shouldn't be trying to add yourself to the root group.

    /var/www should be chowned to www-data:www-data. Anything under that will be writable by the user/group that created it, while still being displayed by the Apache server.

    If you're needing to gain ownership of files, use the chown command. Use the -R switch to recurse into a directory, if you want to change ownership of a directory and all files contained within it.
    Linux User #460341 || Ubuntu User #19510 || Unanswered Posts Team

  4. #4
    Join Date
    Nov 2008
    Location
    Boston
    Beans
    50
    Distro
    Ubuntu

    Re: sudo usermod -G root garyisaStupidUser

    I was able to use Recovery mode to add username to the sudo and admin groups and I got back sudo access. (adduser username sudo and adduser username admin).

    If I try and view syslogs etc with logviewer, it says I don't have permissions.

    if I do grops I see username root sudo admin. My swag was that something in the root group is mucking this up. Thats my silly waild *** guess, but what do I really need to do?

    also for this /var/www should be chowned to www-data:www-data. How does this give me write access to files like /etc/apache2/httpd.conf
    Last edited by gmgj; January 2nd, 2013 at 03:13 PM. Reason: clarify additonal sideffects
    I wrote my first shell script in 5 minutes, it took me a day to figure out you needed to put a . in front of it to get it to execute.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •