Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

I've locked myself out of my Ubuntu box!

  • 11-07-2007 4:22pm
    #1
    Closed Accounts Posts: 17,208 ✭✭✭✭


    From the "Its important to double check the documentation" department:

    I've been having a bit of fun resetting up my file server at home. But today I managed to pull the right doozie of them all, and I can't find a way around it.

    I have been trying to implement an init.d script I found to control Subversion. I made a few small modifications to the script so that I could run them from my own user account (dumb, I now know). Anyway, part of that meant adding my account to a new user group "subversion".

    usermod -Gsubversion aidan

    Now its time to do some editing. sudo emacs /blah/blah/etc

    "aidan is not in the sudoers file. This incident will be reported."

    Well, what I discover now is that, slightly contrary to what the original webpage had told me about -G (adds the user to a new group), it also erases the groups that the user is currently added to (for reasons that are beyond me at the minute...). And now I can't sudo to add a new user to sort the problem out?

    Anyone got any suggestions?


Comments

  • Registered Users, Registered Users 2 Posts: 1,569 ✭✭✭maxheadroom


    Boot off a live CD. Open a root terminal. Chroot into your ubuntu server. Edit the /etc/group or /etc/sudoers file


  • Registered Users, Registered Users 2 Posts: 2,372 ✭✭✭Illkillya


    If you don't have a live CD, you can also get access by booting into single user mode (Google it)


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    No, I have a LiveCD here. Cheers guys.


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    Boot off a live CD. Open a root terminal. Chroot into your ubuntu server. Edit the /etc/group or /etc/sudoers file

    That should do it. If you don't know how to chroot your ubuntu install from the live cd just ask here. :)


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    scojones wrote:
    That should do it. If you don't know how to chroot your ubuntu install from the live cd just ask here. :)
    Or in the Moderator forum ;)


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,133 ✭✭✭Explosive_Cornflake


    Fyi, the switch you want usermod -aG, to add yourself to a supplemental group.
    Suse use just G afiak, and gentoo is -aG. I got caught out by that before, but luckily i had a another shell open as root.


  • Closed Accounts Posts: 7,230 ✭✭✭scojones


    Or in the Moderator forum ;)

    I have to say that was gas. hehe. :)


  • Registered Users, Registered Users 2 Posts: 6,949 ✭✭✭SouperComputer


    always keep a copy of RIP handy!


Advertisement