LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-30-2004, 01:58 PM   #1
tjt
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Rep: Reputation: 0
What's the "autoexec" for linux?


I need to do 3 things:

1. Boot directly into the text mode of Linux 9.0. Right now it defaults to one of the GUIs.
2. Automatically login as root. I disabled password, but I can't seem to figure out how to just autologin, like you can do in Windows.
3. Automatically start running a shell script.

This is probably pretty easy stuff, but I'm new... Thanks!
 
Old 06-30-2004, 02:05 PM   #2
meblost
Member
 
Registered: May 2004
Location: At Keyboard
Distribution: Mandrake 10.0, SuSE 9.0
Posts: 114

Rep: Reputation: 15
look at /etc/inittab for run level stuff. The files in /etc/rc0-6.d are executed depending on the current run level.
 
Old 06-30-2004, 02:07 PM   #3
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Rep: Reputation: 15
re::

In your mananger for system set one user to log automaticaly (root).
For GUI choose terminal, or if you working in KDE, just log out with open shell
 
Old 06-30-2004, 02:08 PM   #4
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
the file /etc/inittab will have a line in there that says
default runlevel: 5
you should change that to 3, this will boot into text based mode
 
Old 06-30-2004, 02:15 PM   #5
tjt
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
Zowie,
You said:

In your mananger for system set one user to log automaticaly (root).
For GUI choose terminal, or if you working in KDE, just log out with open shell

Where do I do this? Talk to me like I'm a 7 year old...
 
Old 06-30-2004, 02:38 PM   #6
zowey
Member
 
Registered: Feb 2004
Location: Croatia
Distribution: slackware 10.1, debian sarge, knoppix, ubuntu 7.04
Posts: 67

Rep: Reputation: 15
no problem

could u tell me what is distribution that you're using?

On mandrake (maybe it's similar under other OS'):
you will open Configuration > KDE > System > Login Mananger
:: you choose 'convience' option and set up auto login

Do you follow?
 
Old 06-30-2004, 02:51 PM   #7
tjt
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
zowie,
nevermind, i got it to work by editting inittab

mingetty --autologin root tty1

Thanks for your help.
 
Old 06-30-2004, 03:00 PM   #8
tjt
LQ Newbie
 
Registered: Jun 2004
Posts: 9

Original Poster
Rep: Reputation: 0
I still need to understand how to run a shell script everytime it logs into tty1. Anyone know how?
 
Old 06-30-2004, 03:15 PM   #9
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
You don't actually need to login as root to run a shell script with root priviliges when the system starts (indeed what you're doing is a security risk). Add the script to your /etc/rc.local file (it may be in a different place depending on your system -- do find rc.local) and it will run with root privileges when the system boots. If you need something to run when root logs in, add it to /root/.bash_profile.
 
Old 06-30-2004, 10:30 PM   #10
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 62
You really should never run as root.
Create a standard user for yourself, and use su to gain root privleges when necessary.

If you run as root all the time, you can do very, very stupid things, like:
Code:
rm -fr /
which will remove the whole file system from underneath you...

--Ian
 
Old 07-01-2004, 01:55 AM   #11
BlueOrb
Member
 
Registered: Feb 2004
Distribution: Debian 3.1 "sarge"
Posts: 31

Rep: Reputation: 15
you could also put that shell script call in ~/.profile
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
bash script: using "select" to show multi-word options? (like "option 1"/"o zidane_tribal Programming 7 12-19-2015 02:03 AM
what is "sticky bit mode" , "SUID" , "SGID" augustus123 Linux - General 10 08-03-2012 05:40 AM
Telling people to use "Google," to "RTFM," or "Use the search feature" Ausar General 77 03-21-2010 12:26 PM
"Xlib: extension "XFree86-DRI" missing on display ":0.0"." zaps Linux - Games 9 05-14-2007 04:07 PM
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 03:32 PM


All times are GMT -5. The time now is 07:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration