Loading ...
Sorry, an error occurred while loading the content.

Re: [LinkStation_General] Re: Getting root access - Login problems with web browser

Expand Messages
  • Wilson
    This is the basic unix stuff.. a single will create the file if it s not existed or it ll overwrite it if it exists. a double will append your new
    Message 1 of 22 , Dec 16, 2004
    • 0 Attachment
      This is the basic unix stuff..

      a single > will create the file if it's not existed or
      it'll overwrite it if it exists.

      a double >> will append your new contents to the end
      of the file, so if you have a export line in the file
      already, and run it again with >>, it'll append a new
      export line after the one you already have.

      That's also why we encourage ppl in here having some
      basic unix skills...if so, you can get this thing
      works more easier instead of spending many times to
      find out what's wrong and trial..

      Wilson
      --- rod_tucker <rod_tucker@...> wrote:

      >
      > Wilson,
      >
      > Many thanks. For some reason the command:
      >
      > echo 'export TERM=vt100' > ~/.bash_profile
      >
      > worked!!
      >
      > But the earlier one:
      >
      > echo "export TERM=vt100" >> ~/.bash_profile
      >
      > did not work.
      >
      > I don't understand what the difference is between
      > these two
      > commands. Both of them put what seemed like
      > *exactly* the same text
      > into the file /root/.bash_profile. However, even
      > though I don't
      > understand, the net result is that I can now log in
      > as root and vi
      > works properly.
      >
      > Having done this, I tried to get vi working when I
      > log in as a
      > user. So I tried typing:
      >
      > echo 'export TERM=vt100' > /home/.bash_profile
      >
      > But this did not work. It came back with a > on the
      > next line. So
      > (logged in as root) I went to vi and created a file
      > called /home/.bash_profile with the following single
      > line:
      >
      > export TERM=vt100
      >
      > Bingo!
      >
      > Thanks for your help.
      >
      > Rod
      >
      >
      >
      > --- In LinkStation_General@yahoogroups.com, Wilson
      > <sonsondei@y...>
      > wrote:
      > > First, you need to make sure where you put the
      > file
      > > to...it works if the file is under the user's home
      > > directory and bash is the default shell.
      > >
      > > Check your /etc/passwd file, make sure you have
      > /root
      > > as root home directory and /bin/bash for shell.
      > >
      > > Secondly, BASH will search for .bash_profile file
      > > under the user home directory for user's
      > customized
      > > setting for the shell, so make sure your
      > .bash_profile
      > > is in /root.
      > >
      > > For linux or many UNIX, environment variable uses
      > > capital letters..so it has to be TERM only, or
      > PATH if
      > > you set up your path.
      > >
      > > to be save, you can login in as root, then do:
      > >
      > > echo 'export TERM=vt100' > ~/.bash_profile
      > >
      > > so it'll write/overwrite your .bash_profile in the
      > > home directory..and logout and login again..
      > >
      > > Run:
      > > set
      > >
      > > and you should see a line:
      > > TERM=vt100
      > >
      > > in there..
      > >
      > > Hope this help.
      > >
      > > Wilson
      > > --- rod_tucker <rod_tucker@y...> wrote:
      > >
      > > >
      > > > -Wilson,
      > > >
      > > > The "vt11" on my post to this users group was a
      > > > ***typo***. Oops,
      > > > sorry! But I have been very careful to use
      > "vt100"
      > > > in all of my
      > > > linkstation commands.
      > > >
      > > > But still it doesn't work. I have tried
      > changing
      > > > the file name
      > > > to .bash-profile instead of .bash_profile, but
      > that
      > > > didn't work.
      > > >
      > > > I have tried deleting the file and re-inserted
      > it
      > > > using the echo
      > > > command, and I have have tried deleting it and
      > > > re-inserted it using
      > > > vi (after first manually typing: export
      > TERM=vt11)
      > > > . But all to
      > > > no avail. It just won't work.
      > > >
      > > > Does .bash_profile need to be an executable
      > file?
      > > > Using the ls -l
      > > > command, I see that .bash_profile is rated as
      > > > -rw-r--r--. I wonder
      > > > if this is the problem. Should it be -rwxr--r--?
      > I
      > > > have also tried
      > > > using "term" instead of "TERM" in the command,
      > but
      > > > that didn't work
      > > > either.
      > > >
      > > > I guess that I could forget about this and just
      > type
      > > > every time I
      > > > log in. But I worry that what I am seeing is
      > might
      > > > be a symptom of
      > > > a bigger problem.
      > > >
      > > > Rod
      > > >
      > > > In LinkStation_General@yahoogroups.com, Wilson
      > > > <sonsondei@y...>
      > > > wrote:
      > > > > Yes Rod, I don't know how did you come out
      > with
      > > > > vt11... try to 'cat ~/.bash_profile' and see
      > if
      > > > you
      > > > > actually have a typo in the file for vt11
      > instead
      > > > of
      > > > > vt100....just edit the file and save
      > it..should
      > > > solve
      > > > > your problem.
      > > > >
      > > > > Wilson
      > > > > --- irvine_stock <r_obermeyer@p...> wrote:
      > > > >
      > > > > >
      > > > > > Rod,
      > > > > > I ran Wilsons export to .bash_profile just
      > as he
      > > > > > described and it
      > > > > > worked great. (Thanks Wilson) After that VI
      > > > always
      > > > > > worked.
      > > > > > ALthough I hate it.
      > > > > > I see that you are showing TERM=vt11. It
      > has to
      > > > be
      > > > > > TERM=vt100 to
      > > > > > work. If that is not it, then I don't know
      > what
      > > > it
      > > > > > could be.
      > > > > >
      > > > > > Rich
      > > > > > --- In LinkStation_General@yahoogroups.com,
      > > > > > "rod_tucker"
      > > > > > <rod_tucker@y...> wrote:
      > > > > > >
      > > > > > > Wilson,
      > > > > > >
      > > > > > > For some reason, this doesn't work for me.
      > I
      > > > > > confirmed that if I
      > > > > > > log in as root and execute this command, a
      > > > file
      > > > > > > called .bash_profile does indeed appear
      > in
      > > > the
      > > > > > home directory,
      > > > > > and
      > > > > > > it's contents are export TERM=vt11. (in
      > fact
      > > > I
      > > > > > ran the command
      > > > > > > twice, and export TERM=vt11 appears
      > twice.)
      >
      === message truncated ===




      __________________________________
      Do you Yahoo!?
      The all-new My Yahoo! - What will yours do?
      http://my.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.