2

Ubuntu, out of the box, has the live user signed into all tty's.

What is the purpose of this?

Why can't I sign the user out of these tty's?

In a freshly installed Ubuntu environment, my user is not signed into all the tty's. Why?

If I do sign into a tty in the installed environment, I can sign out. How is this possible compared to the live situation?

Is it possible to disable tty's? If so, how?

1 Answer 1

4

You can disabled TTY's by removing (or moving to something other than .conf) the following files:

/etc/init/tty1.conf
/etc/init/tty2.conf
/etc/init/tty3.conf
/etc/init/tty4.conf
/etc/init/tty5.conf
/etc/init/tty6.conf

I found the culprit to the auto-login: In the /etc/init/tty1.conf in the live session, there is this line:

exec /bin/login -f ubuntu < /dev/tty1 > /dev/tty1 2>&1

This makes /bin/login log in as "ubuntu" - which has no password set. So, if you want similar functionality, blank the password for an account and set it to log in as that account. Of course, this is generally not recommended unless you're in a live system as it leaves a gaping security hole (unless that user is severely limited).

Also, every time that process it killed (i.e. via exit) it gets called again - which again logs in as the "ubuntu" account.

3
  • Thanks. I'll remaster with those changes in mind and post the results.
    – bambuntu
    Feb 28, 2012 at 15:28
  • That did it! My live cd doesn't start with anyone signed in. And, all the tty's are just a black screen. I just commented out all the lines in the conf files. Now, I'm just hoping this isn't a security issue. Logically, it seems I've closed some holes. But I'm new to this.
    – bambuntu
    Feb 29, 2012 at 6:50
  • If you're trying to secure a live distribution, you might want to add a password to to the "ubuntu" user as well. The 'ubuntu' user by default has an empty password and there's an entry in /etc/sudoers allowing any user in the admin group (i.e. the "ubuntu" user) to run root commands with no password. Just remove the NOPASSWD part.
    – Chuck R
    Mar 1, 2012 at 2:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .