vi does not work in one folder 2) to set root pwd.

vi does not work in one folder 2) to set root pwd.

Post by Sens » Fri, 26 Oct 2001 19:26:48



In this particular folder when i do a vi filename.

vi: 3: not found
vi: ^[: not found
vi: a23y0C^[: not found
vi: s1Arun_test%26: not found
vi: a0y0C^[: not found
vi: a0y0C^[J^[B~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^
H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[: not found
vi: a23y0Crun_test%26: not found
vi: a0y0C^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G: not found

it works fine on other folder.
there is a vi* when i do a lsf on that folder.
can anything be done?

2)when a non root user type su password is not required,
how do i set the password back?

 
 
 

vi does not work in one folder 2) to set root pwd.

Post by Steve Boy » Fri, 26 Oct 2001 23:57:22


Quote:> there is a vi* when i do a lsf on that folder.
> can anything be done?

Remove the '.' from your PATH variable or explicitly call vi from it's
location /bin/vi or some such place.

Quote:> 2)when a non root user type su password is not required,
> how do i set the password back?

This is probably because you hve no root password. Log in as root,
type 'passwd root' and set one up.

Cheers
   Steve

 
 
 

vi does not work in one folder 2) to set root pwd.

Post by mar » Sat, 27 Oct 2001 02:11:47



> In this particular folder when i do a vi filename.

> vi: 3: not found
> vi: ^[: not found
> vi: a23y0C^[: not found
> vi: s1Arun_test%26: not found
> vi: a0y0C^[: not found
> vi: a0y0C^[J^[B~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^
> H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[: not found
> vi: a23y0Crun_test%26: not found
> vi: a0y0C^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G: not found

> it works fine on other folder.

By folder, I assume you really mean file, yes?  It appears the file is
either binary or at least contains a high amount of escape and control
sequences. It appears that the one of these sequences triggered the vi
command to read in a new file, and it is using the remainder of the
contents of the file as a file name list to read in.

You can use the following to view the contents of the file outside of
vi:

cat -v [filename]|pg

(or you can use more, less, or whatever other paging filter you
prefer)

Quote:> there is a vi* when i do a lsf on that folder.
> can anything be done?

> 2)when a non root user type su password is not required,
> how do i set the password back?

What platform/unix version?
Login as root and reset the password to ensure that it actually has
one.

HTH
--
mark

 
 
 

vi does not work in one folder 2) to set root pwd.

Post by Doug Freyubrg » Sat, 27 Oct 2001 04:29:32



> In this particular folder when i do a vi filename.
> vi: 3: not found ...
> there is a vi* when i do a lsf on that folder.
> can anything be done?

Repair your broken path variable.  You put "." near the
froont instead of near the end.  It is best to leave "."
out of path variables completely is possible.
 
 
 

vi does not work in one folder 2) to set root pwd.

Post by Sens » Sat, 27 Oct 2001 09:50:18


I think i have not made it clear enough.Let me try again.
In /users/someone/, i use vi xxxx and it's working fine.
In /users/someone/dir1, i use vi xxxx and i've got this error.
In /users/someone/dir1, i use /usr/bin/vi xxxx , no problem.
                        i use more xxxx, no problem.

xxxx is just a normal text file. I don't think there's problem with
the . in the PATH variable coz i've check it with other machines, the
settings are the same.

Quote:> > In this particular folder when i do a vi filename.

> > vi: 3: not found
> > vi: ^[: not found
> > vi: a23y0C^[: not found
> > vi: s1Arun_test%26: not found
> > vi: a0y0C^[: not found
> > vi: a0y0C^[J^[B~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^
> > H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[: not found
> > vi: a23y0Crun_test%26: not found
> > vi: a0y0C^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G: not found

> > it works fine on other folder.

> By folder, I assume you really mean file, yes?  It appears the file is
> either binary or at least contains a high amount of escape and control
> sequences. It appears that the one of these sequences triggered the vi
> command to read in a new file, and it is using the remainder of the
> contents of the file as a file name list to read in.

> You can use the following to view the contents of the file outside of
> vi:

> cat -v [filename]|pg

> (or you can use more, less, or whatever other paging filter you
> prefer)

> > there is a vi* when i do a lsf on that folder.
> > can anything be done?

> > 2)when a non root user type su password is not required,
> > how do i set the password back?

> What platform/unix version?
> Login as root and reset the password to ensure that it actually has
> one.

> HTH

 
 
 

vi does not work in one folder 2) to set root pwd.

Post by Doug Freyubrg » Sun, 28 Oct 2001 02:33:55



> I don't think there's problem with the . in the PATH variable coz i've
> check it with other machines, the settings are the same.

Think what you wish.  You do not appear qualified to make that call.
Comparing settings is not the same as comparing behavior.  I  suggest
you try repairing the PATH, logging out, loggin back in and seeing if
that fixes the problem.

Quote:> > By folder, I assume you really mean file, yes?

Folder is a Macintosh or PC term for directory.  It's use implies a
very low level of Unix skill in the asker.  It also implies that the
asker is thinking in Mac or PC terms that leads to conclusions like
the above that comparing settings is a necessary and sufficient
approach to eliminate possible solutions.

Important point:

Your first post indictated that there is a binary file named "vi" in a
directory.  It is set executible.  This is a *strong* hint that somone
has attempted to compromise the security on your machine.  What has
saved you so far is the fact that it is a corrupted binary that does
not run on your operating system version.  A user may have copied a
different version of "vi" there by mistake rather than an attack, but
always assume the worst and then work towards the mistake.

 
 
 

vi does not work in one folder 2) to set root pwd.

Post by Laurent-ja » Tue, 30 Oct 2001 00:08:53



> I think i have not made it clear enough.Let me try again.
> In /users/someone/, i use vi xxxx and it's working fine.
> In /users/someone/dir1, i use vi xxxx and i've got this error.
> In /users/someone/dir1, i use /usr/bin/vi xxxx , no problem.
>                         i use more xxxx, no problem.

> xxxx is just a normal text file. I don't think there's problem with
> the . in the PATH variable coz i've check it with other machines, the
> settings are the same.

> > > In this particular folder when i do a vi filename.

> > > vi: 3: not found
> > > vi: ^[: not found
> > > vi: a23y0C^[: not found
> > > vi: s1Arun_test%26: not found
> > > vi: a0y0C^[: not found
> > > vi: a0y0C^[J^[B~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^
> > > H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[B^H~^[: not found
> > > vi: a23y0Crun_test%26: not found
> > > vi: a0y0C^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G^G: not found

> > > it works fine on other folder.

> > By folder, I assume you really mean file, yes?  It appears the file is
> > either binary or at least contains a high amount of escape and control
> > sequences. It appears that the one of these sequences triggered the vi
> > command to read in a new file, and it is using the remainder of the
> > contents of the file as a file name list to read in.

> > You can use the following to view the contents of the file outside of
> > vi:

> > cat -v [filename]|pg

> > (or you can use more, less, or whatever other paging filter you
> > prefer)

> > > there is a vi* when i do a lsf on that folder.
> > > can anything be done?

> > > 2)when a non root user type su password is not required,
> > > how do i set the password back?

> > What platform/unix version?
> > Login as root and reset the password to ensure that it actually has
> > one.

This sounds indeed like an . in your path and a vi in your directory.
That
is what is wrong. Do not compare with other machines, but try to
understand
what is going wrong here.

As a security-measure, remove the . from your path. No self-respecting
admin has . in his path. Too vulnerable for trojans.

BTW: Unix does not have folders but directories.

--

reproduced, read or seen, dead or alive or by any means, including
but not limited to telepathy  without the benevolence of the author.

 
 
 

1. bash 1.14.7(1) and `set -o vi' not working

Hi all,
    I'm having problems automatically setting my command-line editing keys
to vi (i.e., set -o vi) under bash (version 1.14.7(1)).

When the command `set -o vi' is issued within ~/.bashrc or ~/.bash_profile
[I know, it is effectively the same thing in this case] for a login shell
(say, an xterm -ls) then vi editing does not work.  Worse than this,
no amount of `set -o vi' commands issued after this will make it work.
The (seemingly) only way to get vi editing appears to be to state nothing
about the kind of editing you want in either ~/.bashrc or ~/.bash_profile
(so you end up with emacs) and then typing `set -o vi' into the shell
manually.

What am I missing?  (Or, how can I work around this in a transparent way?)
Any help appreciated. :)

P.S.  This is under a Red Hat 6.1 (binary) installation using Linux version
2.2.12-20.  

--

2. Dual boot with XP and RH (grub)!?!?

3. Bash "set -o vi" in .bashrc not working

4. How should I do it?

5. set -o vi will not work when putting command in .bashrc file

6. How to choose with a script dncp or static on bootup?

7. chmod of all the files and sub folders under one folder

8. IP_MASQ with Redhat 5.0 using DSL instructions

9. pwd not in csh/tcsh, coding /bin/pwd ?

10. rm folders, sub-folders and files older than one hour

11. If you need AIX work done, this company is one of the better ones.

12. alias to print working directory (pwd) when doing 'cd'

13. set path does not work for root