Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

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.

share|improve this answer
    
Thanks. I'll remaster with those changes in mind and post the results. –  bambuntu Feb 28 '12 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 '12 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. –  Githlar Mar 1 '12 at 2:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.