WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

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

Offline danielibarnes

  • Hero Member
  • *****
  • Posts: 548
TC 2.4.1: Deprecated code in /root/.profile
« on: October 14, 2009, 04: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, 05: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

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #2 on: November 23, 2009, 10: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, 05: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

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: TC 2.4.1: Deprecated code in /root/.profile
« Reply #4 on: November 29, 2009, 10: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, 01:09:19 PM »
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

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