Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

do not ask for password on su

Status
Not open for further replies.

Scunningham99

Programmer
Sep 20, 2001
815
GB
Hi How can i write script so it does not ptompt for password.

in simle terms heres a test example:-


#more test.si
su - orartest "cd /"

when run :-

ApplRTEST >./test.si
Password:

thanks in advance!



Sy UK
 
hmmm...

I wouldn't support doing this, but you could always use sudo. Allow specific users to,

"sudo su - orartest"

 
SunOS eurfinunx002 5.8 Generic_108528-18 sun4u sparc SUNW,Ultra-4

when i do a which sudo i get:-

root@eurfinunx002# which sudo
no sudo in /usr/sbin /usr/bin

do i need to add a package or something?

thanks again!

Sy UK
 


Maybe /usr/local/bin/sudo [ponder]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
yer not as root as another user..
thanks ill keep u posted!


Sy UK
 
Hi

I am trying to install sudo, but its asking me for a c compiler.:-

configure:3843: error: no acceptable C compiler found in $PATH


Do i install this of the installation cd's and if so which one and or option do i select?

solaris 8 suppliment cd, solaris 8 software 01, 02 ???

thanks in advance!!



Sy UK
 
I am trying this exact same thing with no luck so far. I will keep watching. I posted this same question awhile ago and people said use sudo but without the code. I do not think it works unless you are or can be root which does not work for me.
 
If you are going to complile SUDO you shoud try this:

Code:
1. Download GCC from [URL unfurl="true"]www.sunfreeware.com[/URL] or from the Companion CD.  (I use GCC 2.95.3 for Solaris 8, I use to have problems with other versions).  Perform an ls /usr/ccs/bin; make sure there commands in there.

2. Set your CC environment:
    sh/ksh/bash
    CC=gcc ; export CC
    csh/tcsh
    setenv CC gcc

3.  Set your PATH:
    sh/ksh/bash
    PATH=$PATH:/usr/local/bin:/usr/ccs/bin ; export PATH
    csh/tcsh
    set path = ($PATH:/usr/local/bin:/usr/ccs/bin)

4.  Set LD_LIBRARY_PATH
    sh/ksh/bash
    LD_LIBRARY_PATH=/usr/lib:/usr/local/lib ; export LD_LIBRARY_PATH
    csh/tcsh
    setenv LD_LIBRARY_PATH /usr/lib:/usr/local/lib

5. ./configure

*note: If you use GCC from the Companion CD, you will probably have to change /usr/local/bin and /usr/local/lib to /opt/SFW/bin and /opt/SFW/lib.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top