LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-21-2012, 03:10 AM   #1
logan_the_wolverine
LQ Newbie
 
Registered: Feb 2012
Posts: 4

Rep: Reputation: Disabled
Adding a shell script in start up of single user mode..


please help me out ...
I want to add a shell script of passwd prompt in the single user mode runlevel at the start up.
i am working on red hat v5.
i have already made my shell scripts


Last edited by logan_the_wolverine; 02-21-2012 at 03:17 AM.
 
Old 02-21-2012, 03:17 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
I'd expect that this is not a good solution to your problem, can you explain more about what you want here? If you're doing this from a security perspective, I would suggest using a boot loader password to prevent unauthorized boot configs, e.g. going into init 1 in the first place. Messing with the runlevel setup itself is very likely to bring up other issues.
 
Old 02-22-2012, 08:55 AM   #3
logan_the_wolverine
LQ Newbie
 
Registered: Feb 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
yes you are right my friend...acid_kewpie
that going in runlevel and init file is massive work. and also boot loader configuration is best way in the security perspective.

but i only have to add a shell script in the startup of single user mode. shell script is for printing a massage on system screen using echo command. please tell me formal step for adding a shell script in the startup of single user mode.
 
Old 02-22-2012, 09:36 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,634

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by logan_the_wolverine View Post
yes you are right my friend...acid_kewpie
that going in runlevel and init file is massive work. and also boot loader configuration is best way in the security perspective.

but i only have to add a shell script in the startup of single user mode. shell script is for printing a massage on system screen using echo command. please tell me formal step for adding a shell script in the startup of single user mode.
Ahh...so a homework question, then?? Consider looking in the /etc/init.d/rc1.d directory, and putting a link to your shell-script in that.
 
Old 02-22-2012, 10:21 AM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
@logan:

"Adding a shell script" is not the right answer to this problem. init(8) already has a means for solving this.

Read the inittab(5) manpages.

For further clarification, read (under the heading -- Enable Authentication for Single-User Mode):
http://www.cyberciti.biz/tips/tips-t...le-access.html

Point is, don't reinvent the wheel. It is as simple as:
Code:
~:S:wait:/sbin/sulogin
 
1 members found this post helpful.
  


Reply



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
Unable to Access to Single User Mode or Emergency Mode Pinglu Linux - Newbie 3 10-17-2011 01:25 PM
Emergency mode can mount the HDD with FS error but not in rescue or single user-mode kayod_jj Linux - Newbie 3 12-01-2010 07:03 PM
How to change to single user mode in a dump script meadow400 Linux - Newbie 1 04-26-2010 01:14 PM
Adding multiple user shell script plexus Programming 2 06-19-2004 08:36 PM
`Shutdown now` goes to single user mode? Paused Start time guardian653 Linux - Security 1 12-11-2003 05:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:08 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
Open Source Consulting | Domain Registration