Sponsored Content
Top Forums UNIX for Advanced & Expert Users su option is not fetching the password Post 302693021 by vbe on Tuesday 28th of August 2012 11:45:49 AM
Old 08-28-2012
Either using expect utility or by using files descriptors I suppose...
su command has no options for passwd so it will always prompt... I tried with heredocs without success (but didnt pass much time either...) there is a no very elegant nor secure way if you know which user you want to allow to "su", its using rlogin and a .rhosts file...
like that you will not have any passwd to enter...
you should write your script in such a way all you enter in interative is to generate a newscript that you pass with the su command or rlogin e.g. for su:
Code:
 su <newuser> -c ~/newscript

with rlogin:
Code:
ant:/home/vbe $ remsh ant -l jju -n date
Tue Aug 28 17:44:38 METDST 2012

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

No Password - - Setuid Only Option in Solaris 10

In Solaris 9, when I built users, there was an option for No Password -- Setuid Only. Now that I'm using Solaris 10, I no longer can find that option. Is there an equivalent option of No Password --Setuid Only in Solaris 10? Thanks, LeonD (1 Reply)
Discussion started by: leond
1 Replies

2. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

3. Shell Programming and Scripting

recently introduced to the newer option for find...does an older option exist?

To find all the files in your home directory that have been edited in some way since the last tar file, use this command: find . -newer backup.tar.gz Is anyone familiar with an older solution? looking to identify files older then 15mins across several directories. thanks, manny (2 Replies)
Discussion started by: mr_manny
2 Replies

4. Shell Programming and Scripting

Fetching the string using different patterns

HI, Please help me with the following problem: I have an xml file with the following lines <NameValuePair> <name>SharedResources/JDBC/Admin/password</name> <value>rjmadmin</value> </NameValuePair> <NameValuePair> ... (4 Replies)
Discussion started by: tejastrikez
4 Replies

5. Shell Programming and Scripting

Fetching data from file

Hi All, I'm facing issue while using script. Chk_Etl_Status=`cat /dstage/questnet/qnetdv/input/Etl_Status.dat|cut -d"," -f1` echo Chk_Etl_Status=$Chk_Etl_Status above result is giving me sometime value as 1 and sometime error message as Chk_Etl_Status= dsjoblaunch.sh: test: Specify a... (5 Replies)
Discussion started by: Amit786
5 Replies

6. Solaris

Unrecognized option: sparc-sun-Solaris2.10/bin/as: unrecognized option `-m32'

Hi, I installed some packages required by an app built with python. But when I try python setup.py install, I get the following error: /opt/csw/lib/gcc/sparc-sun-solaris2.10/5.2.0/../../../../sparc-sun-solaris2.10/bin/as: unrecognized option `-m32' Could anyone tell me what's wrong... (4 Replies)
Discussion started by: Kimkun
4 Replies

7. Shell Programming and Scripting

Notable to use password option in zip command

zip -P abc -r FBE_SalesRepAccount_20170913125741.zip FBE_SalesRepAccount_20170913125741.txt zip error: Invalid command arguments (encryption not supported) zip -v Copyright (C) 1990-1999 Info-ZIP Type 'zip "-L"' for software license. This is Zip 2.3 (November 29th 1999), by Info-ZIP.... (1 Reply)
Discussion started by: alokjyotibal
1 Replies

8. Shell Programming and Scripting

Fetching timestamps from the logs.

Dear Experts, I need some help to get the time stamps from the Unix logs. Basically I am want to analyze which step is taking more time. Please give me some inputs. Thanks a lot for your help. I have got different codes for each for phase as we can see in the logs 00002 – UPDT Starting... (5 Replies)
Discussion started by: srikanth38
5 Replies

9. Forum Support Area for Unregistered Users & Account Problems

Password sent via reset password email is 'weak' and won't allow me to change my password

I was unable to login and so used the "Forgotten Password' process. I was sent a NEWLY-PROVIDED password and a link through which my password could be changed. The NEWLY-PROVIDED password allowed me to login. Following the provided link I attempted to update my password to one of my own... (1 Reply)
Discussion started by: Rich Marton
1 Replies
rant-import(1)							    rant-import 						    rant-import(1)

NAME
Rant - Flexible, Ruby based make SYNOPSIS
The rant-import command creates a monolithic rant script tailored to the needs of your project and thus removes the dependency on an Rant installation (but of course one person needs an Rant installation to run rant-import). Run the command with the --help option to get a brief help message: % rant-import --help Probably the easiest way to create your monolithic rant script is with the --auto option: % rant-import --auto ant This will write a monolithic rant script to the file ant in the current directory. To determine which plugins and imports your project is using, it performs step 2 of the rant command as described in doc/rant.rdoc, which means that it loads the Rantfile in the current direc- tory. That one command should be enough: % ruby ant This script has the same behaviour as the rant command. Distribute it with your project and nobody else but you needs an Rant installation. FURTHER INFORMATION
For more information on Rant see: <http://make.rubyforge.org/> <http://make.rubyforge.org/files/doc/rant-import_rdoc.html> AUTHOR
Rant is by Stefan Lang This package is maintained by Ralph Amissah SEE
rant(1) version 0.5.6 July 26, 2006 rant-import(1)
All times are GMT -4. The time now is 10:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy