home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.unix.admin:4373 comp.unix.shell:3193 comp.unix.questions:9561
- Newsgroups: comp.unix.admin,comp.unix.shell,comp.unix.questions
- Path: sparky!uunet!decwrl!csus.edu!netcomsv!sjsumcs!sundance!trung
- From: trung@sundance.SJSU.EDU (Trung Tran)
- Subject: Logging in as root within a shell script
- Message-ID: <trung.712443864@sundance>
- Summary: How to...
- Sender: news@sjsumcs.sjsu.edu (News Administrator)
- Nntp-Posting-Host: sundance.sjsu.edu
- Organization: San Jose State University - Math/CS Dept.
- Date: 29 Jul 92 21:04:24 GMT
- Lines: 14
-
- I would like to run a shell script which will ask me for the root's password
- before allowing me to do some other administrative tasks. Once a correct
- password is entered, the script will go on executing the next command
- (instead of starting a root shell). When all tasks are done, it will
- automatically log out of root shell and continue with the rest of the
- script. Can someone please tell me if this is possible to achieve. If so,
- how can it be done? Or is it too risky?
-
- Any respond is appreciated. Thanks.
- --
- Trung Tran (408) 924-5106
- trung@sjsumcs.SJSU.EDU
- Math & Computer Science Dept.
- San Jose State University
-