LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-10-2004, 02:04 AM   #1
']['HeBroken
Member
 
Registered: Oct 2004
Posts: 35

Rep: Reputation: 15
Quick Ksh Script to open a progie


hey all i was wondering how would i go about creating a simple script that will
change user to root then run a program?

well im kinda used to Aix unix so i just create a cat file...

cat >simp

su root
**********
program name...

ctrl D^


would it be something like this or would i have to compile and other good stuff?... any help will be appreciated....
 
Old 12-10-2004, 06:27 AM   #2
bahramH
Member
 
Registered: Apr 2004
Location: France
Distribution: Mandrake
Posts: 67

Rep: Reputation: 15
No, you don't have to compile. Everything of course works like a standard Unix.

I'm astonished however about your su command, and beeing able to feed the passwd through a shell script. Normally, systems are more secure than *that* and
you'll have to type manually the passwd. (su command refuses to take its
input from something not a normal tty terminal).

You can also have a look at the "login" command and its man pages.
 
  


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
gpg from ksh script Risc91 AIX 2 05-11-2005 10:45 AM
ksh math script SeT Programming 10 10-13-2004 08:06 AM
Can somebody help me with a ksh script? twentymil AIX 7 01-21-2004 09:55 AM
ksh script problem pldobs Programming 2 12-24-2003 11:38 PM
KSH script AquamaN Programming 2 12-08-2003 11:34 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05: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