Root ENV is different from users', how to change?


 
Thread Tools Search this Thread
Operating Systems Solaris Root ENV is different from users', how to change?
# 1  
Old 06-05-2007
Question Root ENV is different from users', how to change?

Hello,

I'm working on a Solaris 9 machine. I found the root's environment variables (say, $PATH, $ORACLE_HOME, big problem) were set differently from the users'. All regular users use C shell now and share the same environment file stored in /usr/local/config/cshrc.default.

Should I just use set/setenv command as root to change root's env variables? Does root use any env setting file as the regular users do? If so, how can I find it and modify it?

Thanks.
Alan
# 2  
Old 06-05-2007
If you are going to use csh as root as well, you can just run 'source /usr/local/config/cshrc.default' to get the environment that is available to other users.
# 3  
Old 06-06-2007
Thanks for the reply. Other than using csh for root, is there other options for root to keep default shell but use same/similar environment variables as the users?
# 4  
Old 06-06-2007
On Solaris 9 do not change the shell for root. The root shell is the static bourne shell. All you need to do is set up the correct .profile in / using the bourne fomat eg:

Code:
PATH=/sbin:/usr/sbin
export PATH

# 5  
Old 06-06-2007
Quote:
Originally Posted by reborg
On Solaris 9 do not change the shell for root. The root shell is the static bourne shell.
I didn't mean to say that the actual login shell is to be changed for root! I meant that once you login as root, you could run csh and source your files as required.

I once had an sysadmin change the shell for root in /etc/passwd, he didn't see that it was /sbin/sh and changed it to /sbin/bash!!! We had to boot the system off a CD and change the shell back.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Can a root role change the root password in Solaris 10?

i do not have root on a solairs 10 server , however i do have the root role, i was wondering if I can change the root password as a a role with the passwd command? I have not tried yet. and do i have to use the # chgkey -p afterwards? i need to patch is why i am asking. thanks (1 Reply)
Discussion started by: goya
1 Replies

2. UNIX for Beginners Questions & Answers

How to use env command to change GREP_OPTIONS variable?

How could I use the env command to change the enviroment variable GREP_OPTIONS so that grep is not case sensitive by setting it to "-i'? So that the command: grep a <<< A Will produce the same output as grep -i a <<< A (8 Replies)
Discussion started by: steezuschrist96
8 Replies

3. Ubuntu

Root access that can't change root password?

We are having a little problem on a server. We want that some users should be able to do e.g. sudo and become root, but with the restriction that the user can't change root password. That is, a guarantee that we still can login to that server and become root no matter of what the other users will... (2 Replies)
Discussion started by: 244an
2 Replies

4. Shell Programming and Scripting

Find users with root UID or GID or root home

I need to list users in /etc/passwd with root's GID or UID or /root as home directory If we have these entries in /etc/passwd root:x:0:0:root:/root:/bin/bash rootgooduser1:x:100:100::/home/gooduser1:/bin/bash baduser1:x:0:300::/home/baduser1:/bin/bash... (6 Replies)
Discussion started by: anil510
6 Replies

5. Solaris

To restrict the users not to change the passwords for NIS users

Hi All, How to restrict the NIS users not to change their passwords in for NIS users?? and my NIS user is unable to login to at client location what could be the problem for this ? Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies

6. Shell Programming and Scripting

how can i change value of incorrect env variable?

Hi, I have ORACLE_HOME= This is wrong, and I want to find this in the file, and replace it with ORACLE_HOME=/home/oracle/product/10.2 can anyone please assist? thanks (2 Replies)
Discussion started by: JamesByars
2 Replies

7. Shell Programming and Scripting

how to reuse a shell script to change env from perl

Hi: I am trying to reuse an existing shell script foo1.csh to set environment variables inside a perl script and its childern processes. Is it possible at all to make those environment variables persistent in the main perl process and its children processes? Do I have to create a new... (4 Replies)
Discussion started by: phil518
4 Replies

8. UNIX for Dummies Questions & Answers

Is there such thing as Global Env Variable for all users?

Hello im using SunOS and its great , I know I can setenv global environment variable per user but my question is can I setenv global environment variable in more higher level ( maybe some kind of root user or something) so that every users will see the same value of this global env (3 Replies)
Discussion started by: umen
3 Replies

9. UNIX for Dummies Questions & Answers

root env

Dear Guys , i installed sun solaries 8 for intel platform . now i want to edit root env or init. files in order to add the follwing : EDITOR=vi export PATH EDITOR export PS1=`uname -n`:\$PWD\> set -o vi alias dir="ls -la|more" alias c=clear stty erase "^H" what file i have to... (13 Replies)
Discussion started by: tamemi
13 Replies

10. UNIX for Dummies Questions & Answers

PWD env variable for root

How do you get the $PWD env variable set for root? I know it's automatic for korn and other shells, but root uses /usr/bin/sh. (5 Replies)
Discussion started by: bcole23
5 Replies
Login or Register to Ask a Question