Unix/Linux 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.

VI command not working

AIX


Tags
solved

Reply    
 
Thread Tools Search this Thread Display Modes
    #8  
Old Unix and Linux 01-02-2018   -   Original Discussion by ZekesGarage
ZekesGarage's Unix or Linux Image
ZekesGarage ZekesGarage is offline
Registered User
 
Join Date: Jan 2008
Last Activity: 4 May 2018, 2:10 PM EDT
Location: Kennesaw GA
Posts: 24
Thanks: 0
Thanked 4 Times in 1 Post
Ok, so ldd returns:


Code:
patloradb01a:/home/prices02 >$sudo ldd /usr/bin/vi
/usr/bin/vi needs:
         /usr/lib/libc.a(shr.o)
         /usr/lib/libcurses.a(shr.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)

So checking the permissions on those...



Code:
patloradb01a:/home/prices02 >$sudo ls -al /usr/lib/libc.a
lrwxrwxrwx    1 bin      bin              19 Jan 23 2015  /usr/lib/libc.a -> /usr/ccs/lib/libc.a
patloradb01a:/home/prices02 >$sudo ls -al /usr/lib/libcurses.a
lrwxrwxrwx    1 bin      bin              25 Jan 23 2015  /usr/lib/libcurses.a -> /usr/ccs/lib/libxcurses.a
patloradb01a:/home/prices02 >$sudo ls -al /usr/lib/libcrypt.a
-r-xr-xr-x    1 bin      bin           11575 Jan 14 2014  /usr/lib/libcrypt.a
patloradb01a:/home/prices02 >$ls -al /unix
lrwxrwxrwx    1 root     system           21 Jan 23 2015  /unix -> /usr/lib/boot/unix_64

All of those look correct to me..
Sponsored Links
    #9  
Old Unix and Linux 01-02-2018   -   Original Discussion by ZekesGarage
milhan's Unix or Linux Image
milhan milhan is offline
Registered User
 
Join Date: Oct 2002
Last Activity: 22 May 2018, 11:03 AM EDT
Location: New England, USA
Posts: 188
Thanks: 9
Thanked 4 Times in 4 Posts
Quote:
Originally Posted by ZekesGarage View Post
Hello all,
I've got a production system that the DBA complained that the vi command was no longer working for the oracle service account for a particular instance. When I logged in as myself, I noticed that it wasn't working for my user either.
When invoked, it just returns to the prompt with an error code of 1. When I run it with sudo it works as expected.
is vim working?
Sponsored Links
    #10  
Old Unix and Linux 01-02-2018   -   Original Discussion by ZekesGarage
ZekesGarage's Unix or Linux Image
ZekesGarage ZekesGarage is offline
Registered User
 
Join Date: Jan 2008
Last Activity: 4 May 2018, 2:10 PM EDT
Location: Kennesaw GA
Posts: 24
Thanks: 0
Thanked 4 Times in 1 Post
Yoda,
I was trying to get strace to work earlier, but only get a usage message when trying it



Code:
patloradb01a:/home/prices02 >$strace -o trace.out vi test.txt
usage: strace [mid sid level] ...

Going through the man pages for strace was no help to me either..

---------- Post updated at 11:47 AM ---------- Previous update was at 11:45 AM ----------

Milhan, vim doesn't seem to be installed
    #11  
Old Unix and Linux 01-02-2018   -   Original Discussion by ZekesGarage
Scrutinizer's Unix or Linux Image
Scrutinizer Scrutinizer is offline Forum Staff  
Moderator
 
Join Date: Nov 2008
Last Activity: 22 May 2018, 4:25 PM EDT
Location: Amsterdam
Posts: 11,807
Thanks: 543
Thanked 3,441 Times in 3,034 Posts
Quote:
Originally Posted by ZekesGarage View Post
Ok, so ldd returns:


Code:
patloradb01a:/home/prices02 >$sudo ldd /usr/bin/vi
/usr/bin/vi needs:
         /usr/lib/libc.a(shr.o)
         /usr/lib/libcurses.a(shr.o)
         /unix
         /usr/lib/libcrypt.a(shr.o)

So checking the permissions on those...



Code:
patloradb01a:/home/prices02 >$sudo ls -al /usr/lib/libc.a
lrwxrwxrwx    1 bin      bin              19 Jan 23 2015  /usr/lib/libc.a -> /usr/ccs/lib/libc.a
patloradb01a:/home/prices02 >$sudo ls -al /usr/lib/libcurses.a
lrwxrwxrwx    1 bin      bin              25 Jan 23 2015  /usr/lib/libcurses.a -> /usr/ccs/lib/libxcurses.a
patloradb01a:/home/prices02 >$sudo ls -al /usr/lib/libcrypt.a
-r-xr-xr-x    1 bin      bin           11575 Jan 14 2014  /usr/lib/libcrypt.a
patloradb01a:/home/prices02 >$ls -al /unix
lrwxrwxrwx    1 root     system           21 Jan 23 2015  /unix -> /usr/lib/boot/unix_64

All of those look correct to me..
The command is not following links, so try using ls -Ll instead so:


Code:
ls -Ll /usr/lib/libc.a /usr/lib/libcurses.a /usr/lib/libcrypt.a /unix

Sponsored Links
    #12  
Old Unix and Linux 01-02-2018   -   Original Discussion by ZekesGarage
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 10 May 2018, 11:06 AM EDT
Location: Galactic Empire
Posts: 3,670
Thanks: 257
Thanked 1,330 Times in 1,246 Posts
Quote:
Originally Posted by ZekesGarage View Post
Yoda,
I was trying to get strace to work earlier, but only get a usage message when trying it



Code:
patloradb01a:/home/prices02 >$strace -o trace.out vi test.txt
usage: strace [mid sid level] ...

Going through the man pages for strace was no help to me either..
Try running truss instead.
Sponsored Links
    #13  
Old Unix and Linux 01-02-2018   -   Original Discussion by ZekesGarage
ZekesGarage's Unix or Linux Image
ZekesGarage ZekesGarage is offline
Registered User
 
Join Date: Jan 2008
Last Activity: 4 May 2018, 2:10 PM EDT
Location: Kennesaw GA
Posts: 24
Thanks: 0
Thanked 4 Times in 1 Post
Scrutinizer,
Using the follow links flag:


Code:
patloradb01a:/home/prices02 >$usr/lib/libcurses.a /usr/lib/libcrypt.a /unix  <
-r-xr-xr-x    1 root     system     36343685 Oct 15 2014  /unix
-r-xr-xr-x    1 bin      bin        12690305 Jan 21 2015  /usr/lib/libc.a
-r-xr-xr-x    1 bin      bin           11575 Jan 14 2014  /usr/lib/libcrypt.a
-r--r--r--    1 bin      bin         1751983 Mar 07 2014  /usr/lib/libcurses.a

Which is the same as the results on the passive cluster node, which is working properly.

Yoda,
Here's the result of the truss output:


Code:
patloradb01a:/home/prices02 >$truss vi test.txt
execve("/usr/bin/vi", 0x2FF22C20, 0x200138A8)    argc: 2
read_sysconfig(0xF07E4660, 0x00000010, 0xFFFFFFFC, 0x10000000, 0x300006DC, 0x00000080, 0x06010000, 0xF08564C0) = 0x00000000
kioctl(2, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 21505, 0x300068C8, 0x00000000)        = 0
sbrk(0x00000000)                                = 0x305CA7DC
vmgetinfo(0x2FF21550, 7, 16)                    = 0
sbrk(0x00000000)                                = 0x305CA7DC
sbrk(0x00000004)                                = 0x305CA7DC
__libc_sbrk(0x00000000)                         = 0x305CA7E0
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
__loadx(0x01480180, 0x2FF20F30, 0x00000A50, 0xF07DA150, 0xF07DA080) = 0xF08C7400
__loadx(0x07080000, 0xF07DA120, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83AC
__loadx(0x07080000, 0xF07DA060, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83B8
__loadx(0x07080000, 0xF07DA130, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83E8
__loadx(0x07080000, 0xF07DA070, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83F4
__loadx(0x07080000, 0xF07DA0F0, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83C4
__loadx(0x07080000, 0xF07DA090, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C83DC
__loadx(0x07080000, 0xF07DA100, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8400
__loadx(0x07080000, 0xF07DA110, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8430
__loadx(0x07080000, 0xF07DA0A0, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8418
__loadx(0x07080000, 0xF07DA0B0, 0xFFFFFFFF, 0xF08C7400, 0x0001F0B0) = 0xF08C8490
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
getuidx(4)                                      = 705
getuidx(2)                                      = 705
getuidx(1)                                      = 705
getgidx(4)                                      = 50
getgidx(2)                                      = 50
getgidx(1)                                      = 50
__loadx(0x01480080, 0x2FF20F30, 0x00000A50, 0x2FF21A90, 0x00000000) = 0xD056C128
access("/usr/lib/nls/msg/en_US/ex.cat", 0)      = 0
_getpid()                                       = 66650270
_getpid()                                       = 66650270
_sigaction(30, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(1, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(1, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(3, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(2, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(15, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(4, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(5, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(6, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(8, 0x2FF22250, 0x2FF22260)           = 0
_sigaction(10, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(11, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(13, 0x2FF22250, 0x2FF22260)          = 0
kioctl(0, 22528, 0x00000000, 0x00000000)        = 0
_sigaction(18, 0x2FF22250, 0x2FF22260)          = 0
_sigaction(18, 0x2FF22250, 0x2FF22260)          = 0
__ksetjmp(0x30412E50, 0xD056C619, 2, 0x30412EB4, 0x2FF22B80, 0x28228202, 0x30005CA4, 0xD0187128) = 0
_sigaction(2, 0x2FF22210, 0x2FF22220)           = 0
_sigaction(18, 0x2FF22210, 0x2FF22220)          = 0
kioctl(2, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 21505, 0x300068C8, 0x00000000)        = 0
access("/usr/lib/nls/msg/en_US/setupterm.cat", 0) = 0
_getpid()                                       = 66650270
kopen("/usr/share/lib/terminfo/x/xterm", O_RDONLY) = 3
kioctl(2, 21509, 0xF050BF66, 0x00000000)        = 0
kread(3, "1A011C\0 %\0 !\0 ▒01 G05".., 4096)    = 2417
close(3)                                        = 0
kioctl(2, 1074295912, 0x2FF21C30, 0x00000000)   = 0
kioctl(2, 1074295912, 0x2FF21C30, 0x00000000)   = 0
kioctl(2, 21511, 0xF050BF78, 0x00000000)        = 0
kioctl(2, 1074033788, 0xF050BF94, 0x00000000)   = 0
kioctl(2, 21511, 0xF050BF66, 0x00000000)        = 0
kioctl(0, 1074295912, 0x2FF221D0, 0x00000000)   = 0
kioctl(2, 1074033664, 0x30014AA8, 0x00000000)   = 0
kioctl(1, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 22528, 0x00000000, 0x00000000)        = 0
kioctl(2, 21505, 0x300068C8, 0x00000000)        = 0
kopen("/home/prices02/.exrc", O_RDONLY)         Err#2  ENOENT
__libc_sbrk(0x00000000)                         = 0x305DA7F0
__ksetjmp(0x30412E50, 0x300067CC, 2, 0x30412EB4, 0x2FF22B80, 0x24228202, 0x30005CA4, 0xD0187128) = 0
statx("/home/prices02/.exrc", 0x2FF22110, 176, 020) Err#2  ENOENT
statx("/home/prices02/.exrc", 0x2FF22200, 76, 0) Err#2  ENOENT
close(-1)                                       Err#9  EBADF
statx("/var/tmp", 0x2FF221F8, 76, 0)            = 0
_getpid()                                       = 66650270
kopen("/var/tmp/Ex50270", O_RDWR|O_CREAT|O_EXCL, S_IRUSR|S_IWUSR) = 3
close(3)                                        = 0
kopen("/var/tmp/Ex50270", O_RDWR)               Err#13 EACCES
__ksetjmp(0x30412E50, 0x0000000D, 2, 0x30412EB4, 0x2FF22280, 0x32228302, 0x30005CA4, 0xD0187128) = 0
access("/usr/lib/nls/msg/en_US/libc.cat", 0)    = 0
_getpid()                                       = 66650270
kopen("/usr/lib/nls/msg/en_US/libc.cat", O_RDONLY) = 3
kioctl(3, 22528, 0x00000000, 0x00000000)        Err#25 ENOTTY
kfcntl(3, F_SETFD, 0x00000001)                  = 0
kioctl(3, 22528, 0x00000000, 0x00000000)        Err#25 ENOTTY
kread(3, "\0\001 ▒\007\007 I S O 8".., 4096)    = 4096
lseek(3, 0, 1)                                  = 4096
lseek(3, 0, 1)                                  = 4096
__libc_sbrk(0x00000000)                         = 0x309DA800
lseek(3, 0, 1)                                  = 4096
_getpid()                                       = 66650270
lseek(3, 0, 1)                                  = 4096
close(3)                                        = 0
kwrite(1, "1B [ ? 1 0 4 9 l", 8)         = 8
kioctl(2, 21511, 0xF050BF66, 0x00000000)        = 0
unlink("/var/tmp/Ex50270")                      = 0
kwrite(1, "1B [ J", 3)                                = 3
kwrite(1, "1B [ ? 1 2 l1B [ ? 2 5 h", 12)     = 12
kfcntl(1, F_GETFL, 0x00000000)                  = 67110914
kfcntl(2, F_GETFL, 0x2FF22FFC)                  = 67110914
_exit(1)

I've had a look at the obvious directories listed in the output, but didn't see anything glaring about them.

Thanks guys
Sponsored Links
    #14  
Old Unix and Linux 01-02-2018   -   Original Discussion by ZekesGarage
Yoda's Unix or Linux Image
Yoda Yoda is offline Forum Advisor  
Jedi Master
 
Join Date: Jan 2012
Last Activity: 10 May 2018, 11:06 AM EDT
Location: Galactic Empire
Posts: 3,670
Thanks: 257
Thanked 1,330 Times in 1,246 Posts
I noticed:-


Code:
kopen("/var/tmp/Ex50270", O_RDWR)               Err#13 EACCES

Can you check your permissions on dir: /var/tmp


Code:
ls -ld /var/tmp

Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell script not working but command works in command prompt picemma UNIX for Dummies Questions & Answers 8 02-02-2016 07:52 AM
Maxdepth command not working in AIX.Need alternative solution for this command kommineni Shell Programming and Scripting 1 02-14-2014 01:50 AM
help with shell script: cp command not working, but mv command works... udelalv Shell Programming and Scripting 1 04-12-2011 04:34 AM
Need help! command working ok when executed in command line, but fails when run inside a script! 4dirk1 Shell Programming and Scripting 4 12-02-2010 05:47 AM
command for recently modified files - "find" command not working joe.mani UNIX for Advanced & Expert Users 1 08-16-2010 01:49 AM



All times are GMT -4. The time now is 01:12 AM.