Home » Infrastructure » Unix » how can i know my default shell
how can i know my default shell [message #98386] Sun, 05 September 2004 23:16 Go to next message
BhavinShah
Messages: 105
Registered: February 2004
Senior Member
Hi, friends,

 

How can i know my default shell and how can i changed that?

which one is best for oracle?

bhavin
Re: how can i know my default shell [message #98387 is a reply to message #98386] Mon, 06 September 2004 14:30 Go to previous messageGo to next message
Tak Tang
Messages: 142
Registered: May 2004
Senior Member
Your default shell is named in /etc/passwd. Find the line with your login id. Each field is seperated by a ':'. The default shell is in field 5 or 6 - I can not remember off the top of my head. Try doing 'man passwd' for information.

There is a command for changing your default shell - I think it is something like 'chsh' (for 'CHange SHell') - but I usually just edit the password file.

Best for Oracle? Don't know.
Re: how can i know my default shell [message #98388 is a reply to message #98387] Mon, 06 September 2004 18:46 Go to previous messageGo to next message
Jai Vrat Singh
Messages: 205
Registered: September 2002
Location: Singapore
Senior Member
It is 7th field. you can use this.

ypcat -k passwd | grep $USER&#124cut -d':' -f7
Re: how can i know my default shell [message #98391 is a reply to message #98388] Wed, 08 September 2004 03:04 Go to previous message
Andy Black
Messages: 6
Registered: August 2004
Junior Member
To find out information about a user you can use the UNIX finger command:
$ finger [[username]]
e.g.
$ finger oracle

It's not recommended to edit the /etc/passwd file as you may corrupt it. Only do this if you really know what you're doing, and of course... make sure you do a backup of the /etc/passwd file first!

It's better to modify a user using the usermod command.

To get help on a UNIX command execute:
$ man [[command]]
e.g.
$ man usermod

To change a user's shell you would execute:
$ usermod -s <shell> <username>
e.g.
$ usermod -s /bin/ksh somebody

Historically, most Oracle DBA's have used the korn shell (/bin/ksh or /usr/bin/ksh). I'm not sure why everyone started using this shell, but you'll find that most DBAs use it because ... well ... most other DBAs use it. You'll be able to use their scripts that way :)

Regards, Andy
Previous Topic: Oracle for Solaris X86
Next Topic: search and replace in vi editor
Goto Forum:
  


Current Time: Thu Mar 28 12:35:09 CDT 2024