Cannot su to a user in AIX | Unix Linux Forums | AIX

  Go Back    


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

Cannot su to a user in AIX

AIX


Tags
aix, unix

Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-04-2013
Vijay Gurusamy Vijay Gurusamy is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 5 February 2013, 4:45 AM EST
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
IBM Cannot su to a user in AIX

Hi All,

We are facing the below issue when we try to SU to a user in AIX


Code:
0:root@dehensv215:/var/adm # su - orac38
foreach: Words not ()'ed.
% pwd
/oracle/C38
% ls

We are able to login to other admin user in the same server only problem is with this user orac38.

Guess some problem with environmental variables,

We are not able to login to this user and we are facing problems because of this issue.

Please help and provide your suggestions in this regard.

Thanks,
Vijay

Last edited by Scott; 02-04-2013 at 07:01 AM.. Reason: Code tags
Sponsored Links
    #2  
Old 02-04-2013
Citroen Citroen is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 13 March 2013, 9:10 AM EDT
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Hi,
Try

Code:
su orac38

Maybe something is wrong with orac38 profile
Regards
Sponsored Links
    #3  
Old 02-04-2013
Vijay Gurusamy Vijay Gurusamy is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 5 February 2013, 4:45 AM EST
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Cannot su to a user in AIX

Hi,

I tried and got the below

Code:
0:root@dehensv215:/oracle/C38 # su orac38
%

This time it didn't pop up the error but still its showing % symbol after login

please let us know were we can chk the profiles.

Thanks

Last edited by Scott; 02-04-2013 at 07:02 AM.. Reason: Code tags
    #4  
Old 02-04-2013
Citroen Citroen is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 13 March 2013, 9:10 AM EDT
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Hi,
You have a .cshrc file: what's the content?
Regards
Sponsored Links
    #5  
Old 02-04-2013
Vijay Gurusamy Vijay Gurusamy is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 5 February 2013, 4:45 AM EST
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
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:
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 08:23 AM..
Sponsored Links
    #6  
Old 02-04-2013
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 23 October 2014, 11:38 AM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 4,286
Thanks: 45
Thanked 824 Times in 651 Posts
citroen is correct: the error doesn't come from "su" but from the login process of the user. Possible candidates are: the file "~/.profile" and the file "~/.cshrc".

The difference between "su - user" and "su user" is that "su - user" sets the complete environment for the new user you switch to while "su user" just changes the "effective user ID" and not the environment. If userA does a "su - userB" the session will still have the environment of "userA", but all the privileges of "userB".

I hope this helps.

bakunin
Sponsored Links
    #7  
Old 02-04-2013
Citroen Citroen is offline
Registered User
 
Join Date: Jul 2012
Last Activity: 13 March 2013, 9:10 AM EDT
Posts: 16
Thanks: 0
Thanked 1 Time in 1 Post
Hi,
You have to find which sourced environment is not correct. You can source .csh files.
Regards
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Limit a user on AIX edosseh AIX 2 12-20-2010 02:09 PM
Switching user in AIX 5 mjdarm UNIX for Advanced & Expert Users 1 07-17-2008 07:44 AM
AIX Virtualization question for non-AIX user greenteabagger AIX 1 09-07-2006 08:02 PM
AIX.4 New User Help swoozie UNIX for Dummies Questions & Answers 1 10-18-2005 05:20 AM
User ID (UID) in AIX learner AIX 1 09-29-2005 04:59 AM



All times are GMT -4. The time now is 12:30 PM.