home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / admin / 4373 < prev    next >
Encoding:
Internet Message Format  |  1992-07-29  |  1.1 KB

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