Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: How do I remove the guest account completely?

  1. #1
    Join Date
    Apr 2012
    Location
    Oakville, Ontario, Canada
    Beans
    161
    Distro
    Ubuntu 13.04 Raring Ringtail

    How do I remove the guest account completely?

    How do I remove the guest account entirely from Ubuntu 12.04?
    I've already removed it from my login screen, but the account still exists (just isn't displayed at login anymore).

    I've looked around on Google and the only things I find are how to remove it from the login screen.

  2. #2
    Join Date
    Apr 2012
    Location
    Phoenix, Arizona
    Beans
    166
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I remove the guest account completely?

    Ok, I just investigated this and it looks like when you use the guest option at the login screen, Ubuntu 12.04 creates a temporary user account named guest-XXXXX (where XXXXX is a bunch of random letters) and then deletes the account again as soon as the guest session logs out.

    What account are you looking to remove? If it is a guest-blahblah account left over (perhaps the system crashed while a guest was logged in?) you can remove it with
    Code:
    sudo deluser <username>
    You shouldn't have to specify the file deleting options to deluser because the ubuntu guest accounts are created with homes in /tmp, which should be cleared out at boot time anyway.

  3. #3
    Join Date
    Apr 2012
    Location
    Oakville, Ontario, Canada
    Beans
    161
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How do I remove the guest account completely?

    What I want to do is remove the guest account from being usable. Like, I don't want there to be a guest account option on the start menu or at all (even after setting guest account to false in the lightdm.conf file it's still possible to use the guest account after logging in to my account; and I'd assume if you were to log in through a terminal it'd be possible to use the guest account again).

  4. #4
    Join Date
    Apr 2012
    Location
    Phoenix, Arizona
    Beans
    166
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I remove the guest account completely?

    Quote Originally Posted by Zukaro View Post
    (even after setting guest account to false in the lightdm.conf file it's still possible to use the guest account after logging in to my account
    Oh really? Like from the menu with your name at the top that you use to switch users? Hmmm.

    Well we need to figure out where that is configured then. I'm not sure where to start and don't have time right this minute to investigate, hopefully someone else has an idea.

    and I'd assume if you were to log in through a terminal it'd be possible to use the guest account again).
    Given the way that it's working, I wouldn't assume that. Remember that when you aren't using the guest account, it doesn't exist. Something with root privileges needs to create a guest account before it can be used; this is done by the login screen. When you do it from the user-switch menu, I'm thinking it probably passes a request back to the login screen when your session suspends and the login screen is again responsible for doing this work. As far as I know, terminal sessions of any sort don't have any access to or control over the login screen.
    Last edited by strask; April 30th, 2012 at 01:04 AM. Reason: fix broken tag

  5. #5
    Join Date
    Aug 2009
    Location
    Montevideo, Uruguay
    Beans
    259
    Distro
    Ubuntu

    Re: How do I remove the guest account completely?

    This is a very common problem.

    Assuming you're using the default login manager that comes with Ubuntu (Lighdm), you need to run:

    Code:
    sudo gedit /etc/lightdm/lightdm.conf
    And append this line to the end of the file:

    Code:
    allow-guest=false
    Also, 'guests' can't login remotely to your computer as this would obviously be a security issue, no matter if the 'guest account' is enabled.
    Last edited by uylug; April 30th, 2012 at 01:10 AM.

  6. #6
    Join Date
    Apr 2012
    Location
    Oakville, Ontario, Canada
    Beans
    161
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How do I remove the guest account completely?

    I've already edited the lightdm.conf file but it still appears under my username if I click on it (the thing that lets you quickly change sessions). It's not really a big deal, but I'd rather remove it if I'm never gonna use it.
    Also, if I click logout the login screen shows the guest login again. If I restart it's not there, but if I just logout and don't restart then the guest login is present again.
    Last edited by Zukaro; April 30th, 2012 at 01:14 AM.

  7. #7
    Join Date
    Aug 2009
    Location
    Montevideo, Uruguay
    Beans
    259
    Distro
    Ubuntu

    Re: How do I remove the guest account completely?

    Yeah, you just need to reboot lightdm but if you do, all your programs will be closed.

    Simply reboot your computer when you're ready, or run:

    Code:
    sudo /etc/init.d/lightdm restart
    ( this will close any application you have running, if any )

    Edit:
    I got what you're saying. It must be a bug.
    Last edited by uylug; April 30th, 2012 at 01:18 AM.

  8. #8
    Join Date
    Apr 2012
    Location
    Oakville, Ontario, Canada
    Beans
    161
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How do I remove the guest account completely?

    It's working now actually.
    Although lightdm never restarted (I got impatient after waiting for about 5 min so I just hit ctrl alt delete and restart). But it's working now.

    Thanks.

  9. #9
    Join Date
    Oct 2007
    Location
    Vancouver, Canada
    Beans
    69
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How do I remove the guest account completely?

    Thanks uylug for your fix. It seems odd that with Unity we've taken some steps backwards from Ubuntu's 10.04 Gnome 2 where you could just check a checkbox to enable or disable the guest account from the user accounts' dialog window.

  10. #10
    Join Date
    Jul 2012
    Beans
    5

    Re: How do I remove the guest account completely?

    Guys, I'm having trouble with this.

    I have two Revo R3600 boxes. Both have Ubuntu 12.04 LTS installed via USB.

    On the first machine, I was able to use the above command to edit the lightdm.conf but on the second, it either does nothing (ie nothing happens except the command box disappears), or it states that the files aren't found.

    Any ideas?

Page 1 of 2 12 LastLast

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
  •