LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 06-03-2007, 06:11 PM   #1
Sergei Z
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Rep: Reputation: 0
Problem updating a shell startup file in SUSE Server 10


Hi,

As a part of Oracle Dbase 10gR2 pre-installation tasks on in SUSE Enterprise Server 10, Iím trying to update oracleís user shell startup file. Oracleís procedure for that is here:

http://download-east.oracle.com/docs...102/b28052.pdf

on page 13.

I open the file for editing in vi:

$ vi .profile

and added one line ther as

umask 022

but when I try to save file with command :wq Iím getting a message:

ď.profileĒ E212: canít open file for writing

when I try to exit vi with command :q the message becomes:

Can't write viminfo file in /home/oracle/.viminfo

while acc to Oracle instructions everything should work OK of course.

Can anyone help me understand what is going on? Iím new to Linux, and I donít even know the name of the file Iím trying to edit [is it really .profile?], let alone its location.

Sergei
 
Old 06-03-2007, 07:05 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
It there an oracle user. It almost looks like they set it up where oracle is a regular user.
Try su'ing as the oracle user, or su'ing to root before editing the file.
 
Old 06-03-2007, 08:06 PM   #3
Sergei Z
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal
It there an oracle user. It almost looks like they set it up where oracle is a regular user.
Try su'ing as the oracle user, or su'ing to root before editing the file.
thanks for the response. I thought so myself too: maybe *oracle* user does not have the right permissions. So r u suggesting this?:

# su - root
# vi .profile

..then anither Q: how can i be sure that I'm editing the right shell startup file [i.e. the one for *oracle* user]? cana u suggest right commands for this?

appreciating your help on this..
 
Old 06-03-2007, 08:52 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
The one in oracle's home directory is the correct one. Read though the section in the "info bash" manual. Search ( /profile ) for profile or bash_login. Bash will run one of three startup scripts depending on which one is present. If you accidentally produced another one such as bash_login or bash_profile, that one may be sourced instead. Of course you could have the one with higher priority source the other one, the same way that ~oracle/.profile may source ~/.bashrc.

Remember that the .profile script is an interactive login script, so before you changes can take effect, you will need to either restart the oracle service or reboot.

---

I'm surprised that oracle is setup as a regular user and not as a system user. That is usually how things like samba, mysql and others work. They even have /bin/false as their default shell in /etc/passwd. This is to prevent someone from logging in as that user.
 
Old 06-03-2007, 10:18 PM   #5
Sergei Z
LQ Newbie
 
Registered: Jun 2007
Posts: 9

Original Poster
Rep: Reputation: 0
jschiwal,

thanx a lot for yr time answering this. 80% of what u r talking about still does not make much sense to me due to my [very] limited Unix experience, but anyway i'm getting some very valuable pointers. In the mean time, i was able to work around the problem by running command that Oracle apparently omitted from their guidelines:

chown -R oracle.oinstall /u01

..after that I was able to edit/then save the shell file, and then check *oracle* user environment param(s) by running

# umask
#env | more
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with updating server. EYEdROP Linux - Software 1 03-20-2007 12:42 PM
Problem at startup, shell starting after checking swap partition DierRe Fedora 1 12-29-2006 11:27 AM
file courrepted with ftp Shell programming on suse 10.0 samir01m11 Programming 3 08-04-2006 07:46 AM
updating GLIBC on SuSE Server 8.0 kenapp Linux - Software 5 11-18-2004 01:03 PM
Editing text file in Shell - Konsole (SuSE 9.1) Ree Linux - Newbie 5 10-03-2004 11:48 AM


All times are GMT -5. The time now is 07:59 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration