Sponsored Content
Full Discussion: Cannot su to a user in AIX
Operating Systems AIX Cannot su to a user in AIX Post 302766107 by Vijay Gurusamy on Monday 4th of February 2013 08:14:07 AM
Old 02-04-2013
Cannot Su to a user

Hi ,

Please find below the content of .cshrc file under location /oracle/C38

Code:
0:root@dehensv215:/oracle/C38 # cat .cshrc
# @(#) $Id: //bc/701-1_REL/src/ins/SAPINST/impl/tpls/ind/ind/SAPSRC.CSH#1 $ SAP
# necessary to get hostname without domain (AIX, OS/390 and NOT sun)
switch (`uname`)
   case AIX*:
       alias hostname 'hostname -s'
   breaksw
   case OS/390*:
       setenv _BPXK_AUTOCVT ON
       setenv _TAG_REDIR_IN TXT
       set    _TAG_REDIR_IN=TXT
       setenv _TAG_REDIR_OUT TXT
       set    _TAG_REDIR_OUT=TXT
       setenv _TAG_REDIR_ERR TXT
       set    _TAG_REDIR_ERR=TXT

       alias hostname 'hostname -s'
   breaksw
endsw
# SAP environment
if ( -e $HOME/.sapenv_`hostname`.csh ) then
   source $HOME/.sapenv_`hostname`.csh
else if ( -e $HOME/.sapenv.csh ) then
   source $HOME/.sapenv.csh
endif
# APO environment
if ( -e $HOME/.apoenv_`hostname`.csh ) then
   source $HOME/.apoenv_`hostname`.csh
endif
# LiveCache environment
if ( -e $HOME/.lcenv_`hostname`.csh ) then
   source $HOME/.lcenv_`hostname`.csh
else if ( -e $HOME/.lcenv.csh ) then
   source $HOME/.lcenv.csh
endif
# JAVA environment
if ( -e $HOME/.j2eeenv_`hostname`.csh ) then
   source $HOME/.j2eeenv_`hostname`.csh
else if ( -e $HOME/.j2eeenv.csh ) then
   source $HOME/.j2eeenv.csh
endif
# XI environment
if ( -e $HOME/.xienv_`hostname`.csh ) then
   source $HOME/.xienv_`hostname`.csh
else if ( -e $HOME/.xienv.csh ) then
   source $HOME/.xienv.csh
endif
# RDBMS environment
# @(#) $Id: //bc/701-1_REL/src/ins/SAPINST/impl/tpls/ind/ind/DBSRC.CSH#1 $ SAP
if ( -e $HOME/.dbenv_`hostname`.csh ) then
   source $HOME/.dbenv_`hostname`.csh
else if ( -e $HOME/.dbenv.csh ) then
   source $HOME/.dbenv.csh
endif

Thanks

Moderator's Comments:
Mod Comment edit by bakunin: Please re-read the rules and use CODE-tags when posting code. View this code tag video for how to use code tags when posting code and data.

Last edited by bakunin; 02-04-2013 at 09:23 AM..
 

10 More Discussions You Might Find Interesting

1. AIX

User ID (UID) in AIX

what is the upper limit for UID is AIX 5.3 ? (1 Reply)
Discussion started by: learner
1 Replies

2. UNIX for Dummies Questions & Answers

AIX.4 New User Help

I am sure someone will yell at me over this post, but honestly I have searched. It doesn't help that I am not sure what to search on. Little background. Working at new company, Company has a program on a Unix box AIX.4. I know virtually nothing about Unix and Neither does anyone else here ... (1 Reply)
Discussion started by: swoozie
1 Replies

3. AIX

AIX Virtualization question for non-AIX user

Hello, My first post to the Unix forums, thanks for having me! The division of the company I work for uses a xseries/redhat/VMWareServer solution to make sure that we keep hardware overhead low and use our machines to as near capacity as we can. These boxes are Intel with usually dual or... (1 Reply)
Discussion started by: greenteabagger
1 Replies

4. UNIX for Dummies Questions & Answers

User stuck in AIX

Hello guys, new here so please take it easy on me :-). Here is my issue. We use an application called Medical Manager and it runs on AIX. There is a user that is showing stuck with in the application. However when I try to run any of "ps" commands I don't see it. I need to kill this user and I... (2 Replies)
Discussion started by: mali77
2 Replies

5. UNIX for Advanced & Expert Users

Switching user in AIX 5

I need to do a switch user in an automated mode and do a ftp using that switched id. Scenario: initial login xx. switch to user-yy without manually entering the password. ftp some files from user yy to another user zz - automated mode. Can any unix experts can help me for my above query? (1 Reply)
Discussion started by: mjdarm
1 Replies

6. AIX

user cannot login into AIX-6.1 server

Dear Friends , I got a problem In our AIX 6.1 server . When I start or restart the machine I cannot Login the server . It shows a dialog box and shows some comments , those are : >> The DT messaging system could not be started . To correct the problem : 1. Choose to return the login... (1 Reply)
Discussion started by: shipon_97
1 Replies

7. AIX

cant su to user or root AIX 5.3

Hi all, I cannt use 'su' to login to root or any other users though everything seems ok. I read some articles that says if you do recursive chmod 777 on /usr it can create this problem. I did the same. can anybody tell me how to repair it. Any ideas will be appreciated. thnks (7 Replies)
Discussion started by: itesh.dash
7 Replies

8. AIX

Limit a user on AIX

Hello, Sorry for my poor English. I have to reduce rights for a user on AIX system so that: When he does , he find in output, only filesystems on which he has permissions .He can't do to change user. Very thanks for helping. (2 Replies)
Discussion started by: edosseh
2 Replies

9. UNIX for Dummies Questions & Answers

Read-only user in AIX

Hi, I want to create a new user,and I want to give read permission to a folder which owned by root. How can I do this? thanks for your helps (4 Replies)
Discussion started by: sersoy
4 Replies

10. AIX

User restriction on C/C++ compiler on AIX

Hello, I am curious that is there a way I can restrict a user or a set of users to execute the C/C++ compiler, basically what I want is to lock it down to a particular user and none of the other users should be able to compile any code. Thanks in advance. (14 Replies)
Discussion started by: m6248m
14 Replies
keychain(1)                                                    http://www.funtoo.org                                                   keychain(1)

NAME
keychain - re-use ssh-agent and/or gpg-agent between logins SYNOPSIS
keychain [ -hkQqV ] [ --clear --help --ignore-missing --noask --nocolor --nogui --nolock --quick --quiet --version ] [ --agents list ] [ --attempts num ] [ --dir dirname ] [ --host name ] [ --lockwait seconds ] [ --stop which ] [ --timeout minutes ] [ keys... ] DESCRIPTION
keychain is a manager for ssh-agent, typically run from ~/.bash_profile. It allows your shells and cron jobs to share a single ssh-agent process. By default, the ssh-agent started by keychain is long-running and will continue to run, even after you have logged out from the system. If you want to change this behavior, take a look at the --clear and --timeout options, described below. When keychain is run, it checks for a running ssh-agent, otherwise it starts one. It saves the ssh-agent environment variables to ~/.keychain/${HOSTNAME}-sh, so that subsequent logins and non-interactive shells such as cron jobs can source the file and make passwordless ssh connections. In addition, when keychain runs, it verifies that the key files specified on the command-line are known to ssh-agent, otherwise it loads them, prompting you for a password if necessary. Keychain also supports gpg-agent in the same ways that ssh-agent is supported. By default keychain attempts to start all available agents but will fall back to only gpg-agent or only ssh-agent if either is unavailable. You can specifically limit keychain using the --agents option. keychain supports most UNIX-like operating systems, including Cygwin. It works with Bourne-compatible, csh-compatible and fish shells. OPTIONS
--agents list Start the agents listed. By default keychain will build the list automatically based on the existence of ssh-agent and/or gpg-agent on the system. The list should be comma-separated, for example "gpg,ssh" --attempts num Try num times to add keys before giving up. The default is 1. --clear Delete all of ssh-agent's keys. Typically this is used in .bash_profile. The theory behind this is that keychain should assume that you are an intruder until proven otherwise. However, while this option increases security, it still allows your cron jobs to use your ssh keys when you're logged out. --confirm Keys are subject to interactive confirmation by the SSH_ASKPASS program before being used for authentication. See the -c option for ssh-add(1). --dir dirname Keychain will use dirname rather than $HOME/.keychain --eval Keychain will print lines to be evaluated in the shell on stdout. It respects the SHELL environment variable to determine if Bourne shell or C shell output is expected. --env filename After parsing options, keychain will load additional environment settings from "filename". By default, if "--env" is not given, then keychain will attempt to load from ~/.keychain/[hostname]-env or alternatively ~/.keychain/env. The purpose of this file is to override settings such as PATH, in case ssh is stored in a non-standard place. -h --help Show help that looks remarkably like this man-page. As of 2.6.10, help is sent to stdout so it can be easily piped to a pager. --host name Set alternate hostname for creation of pidfiles --ignore-missing Don't warn if some keys on the command-line can't be found. This is useful for situations where you have a shared .bash_profile, but your keys might not be available on every machine where keychain is run. --inherit which Attempt to inherit agent variables from the environment. This can be useful in a variety of circumstances, for example when ssh-agent is started by gdm. The following values are valid for "which": local Inherit when a pid (e.g. SSH_AGENT_PID) is set in the environment. This disallows inheriting a forwarded agent. any Inherit when a sock (e.g. SSH_AUTH_SOCK) is set in the environment. This allows inheriting a forwarded agent. local-once Same as "local", but only inherit if keychain isn't already providing an agent. any-once Same as "any", but only inherit if keychain isn't already providing an agent. By default, keychain-2.5.0 and later will behave as if "--inherit local-once" is specified. You should specify "--noinherit" if you want the older behavior. --lockwait seconds How long to wait for the lock to become available. Defaults to 5 seconds. Specify a value of zero or more. If the lock cannot be acquired within the specified number of seconds, then this keychain process will forcefully acquire the lock. --noask This option tells keychain do everything it normally does (ensure ssh-agent is running, set up the ~/.keychain/[hostname]-{c}sh files) except that it will not prompt you to add any of the keys you specified if they haven't yet been added to ssh-agent. --nocolor Disable color hilighting for non ANSI-compatible terms. --nogui Don't honor SSH_ASKPASS, if it is set. This will cause ssh-add to prompt on the terminal instead of using a graphical program. --noinherit Don't inherit any agent processes, overriding the default "--inherit local-once" --nolock Don't attempt to use a lockfile while manipulating files, pids and keys. -k --stop which Kill currently running agent processes. The following values are valid for "which": all Kill all agent processes and quit keychain immediately. Prior to keychain-2.5.0, this was the behavior of the bare "--stop" option. others Kill agent processes other than the one keychain is providing. Prior to keychain-2.5.0, keychain would do this automatically. The new behavior requires that you specify it explicitly if you want it. mine Kill keychain's agent processes, leaving other agents alone. -Q --quick If an ssh-agent process is running then use it. Don't verify the list of keys, other than making sure it's non-empty. This option avoids locking when possible so that multiple terminals can be opened simultaneously without waiting on each other. -q --quiet Only print messages in case of warning, error or required interactivity. As of version 2.6.10, this also suppresses "Identities added" messages for ssh-agent. --timeout minutes Set a timeout in minutes on your keys. This is conveyed to ssh-agent which does the actual timing out of keys since keychain doesn't run continuously. -V --version Show version information. EXAMPLES
This snippet should work in any shell to load two ssh keys and one gpg key: eval `keychain --eval id_rsa id_dsa 0123ABCD` If you have trouble with that in csh: setenv SHELL /bin/csh eval `keychain --eval id_rsa id_dsa 0123ABCD` This is equivalent for Bourne shells (including bash and zsh) but doesn't use keychain's --eval feature: keychain id_rsa id_dsa 0123ABCD [ -z "$HOSTNAME" ] && HOSTNAME=`uname -n` [ -f $HOME/.keychain/$HOSTNAME-sh ] && . $HOME/.keychain/$HOSTNAME-sh [ -f $HOME/.keychain/$HOSTNAME-sh-gpg ] && . $HOME/.keychain/$HOSTNAME-sh-gpg This is equivalent for C shell (including tcsh): keychain id_rsa id_dsa 0123ABCD host=`uname -n` if (-f $HOME/.keychain/$host-csh) then source $HOME/.keychain/$host-csh endif if (-f $HOME/.keychain/$host-csh-gpg) then source $HOME/.keychain/$host-csh-gpg endif To load keychain variables from a script (for example from cron) and abort unless id_dsa is available: # Load keychain variables and check for id_dsa [ -z "$HOSTNAME" ] && HOSTNAME=`uname -n` . $HOME/.keychain/$HOSTNAME-sh 2>/dev/null ssh-add -l 2>/dev/null | grep -q id_dsa || exit 1 SEE ALSO
ssh-agent(1) NOTES
Keychain was created and is currently maintained by Daniel Robbins. If you need to report a bug or request an enhancement, please post to the funtoo-dev mailing list <http://groups.google.com/group/funtoo-dev>. For more information about keychain, please visit <http://www.funtoo.org>. 2.7.1 2010-05-07 keychain(1)
All times are GMT -4. The time now is 08:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy