WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC 2.4.1: Deprecated code in /root/.profile  (Read 2581 times)

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
TC 2.4.1: Deprecated code in /root/.profile
« on: October 14, 2009, 01:25:58 PM »
Since the autologin user for tty1 in /etc/inittab is now set to $USER by tc-config (line 198), the script code in /root/.profile causes incorrect operation. The symptom is that if other virtual terminals are enabled, logging in as root will immediately su as the tc user.

Removing lines 5-10 of /root/.profile will allow a user to log in as root.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #1 on: October 14, 2009, 02:32:13 PM »
It seems there is a race condition between the processing of the tty1 settings in /etc/inittab and its modification by /etc/init.d/tc-config (line 198). Booting with /root/.profile modified as above and no boot parameters results in an autologin which randomly logs in as either root or the tc user. The default /root/.profile hides this race condition because even a root login will result in su as the tc user.

Based on my observation, I'd say it is unsafe to modify /etc/inittab within /etc/init.d/tc-config.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #2 on: November 23, 2009, 07:40:26 AM »
I see this is a message that I have somehow overlooked.
I agree with our statement, actually it is orphaned code in tc-config and will be removed.
10+ Years Contributing to Linux Open Source Projects.

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #3 on: November 28, 2009, 02:41:24 PM »
The problem still exists in 2.6. If I specify "noautologin" and then login as root it will "sudo su" as tc user.

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #4 on: November 29, 2009, 07:54:23 AM »
Only the orphaned code in tc-config was deleted in 2.6.
I believe you mean subsquent root logins.
Will be addressed in 2.7
10+ Years Contributing to Linux Open Source Projects.

Offline jpeters

  • Restricted
  • Hero Member
  • *****
  • Posts: 1017
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #5 on: November 29, 2009, 10:09:19 AM »
The problem still exists in 2.6. If I specify "noautologin" and then login as root it will "sudo su" as tc user.

..probably only safe if you remaster anyway.  There's a noautologin script.  

Offline roberts

  • Administrator
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #6 on: November 29, 2009, 10:44:36 AM »
Agreed.
10+ Years Contributing to Linux Open Source Projects.