root env


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers root env
# 8  
Old 07-09-2003
thanks guys ,, i think am getting much close .

i loged as root then changed the shell to ksh ... not editing the /etc/passwd ...

i tried from commnad line :

#alais c=clear
#c

it work .

but when i tried to save it in .profile file i created in / or .kshrc , saved and logged again it did not work

same error ...
#c
c : not found

what i want is to save this alias ( alias c=clear ) so i can use it each time i log automatically

thanks to all
# 9  
Old 07-09-2003
Place the alias in /.kshrc and remember, just logging in won't work. You have to change the shell to ksh, and then source the files.
# echo $SHELL
/sbin/sh
# ksh
# . /.kshrc
#
# 10  
Old 07-10-2003
thanks now it is working ...

but each time i have to enter . /.kshrc !??

guys am confused becouse i have another solaries 7 server and i only created /.kshrc file and i entered all the env i want and all aliases ...

and when i enter thru shell all aliases work without doing anything !

thanks
# 11  
Old 07-10-2003
Quote:
i have another solaries 7 server and i only created /.kshrc file and i entered all the env i want and all aliases ...
And what is the default shell of that user you are logging in as on this other Solaris server?
# 12  
Old 07-10-2003
/bin/ksh
# 13  
Old 07-10-2003
That is why it works. It's automatically running .kshrc and .profile on login. This was mentioned in one of the posts about changing the default shell for root from /sbin/sh to /bin/ksh. The only problem is some UNIX do not recommend this due to the fact that in single-user mode, /bin/ksh may not be mounted (it's a link to /usr/bin/ksh and /usr may not be mounted).
# 14  
Old 07-12-2003
got you ..

no problem and thanks to all .

later
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Can you gain root privileges if the suid program does not belong to root?

I had a question in my test which asked where suppose user B has a program with 's' bit set. Can user A run this program and gain root privileges in any way? I suppose not as the suid program run with privileges of owner and this program will run with B's privileges and not root. (1 Reply)
Discussion started by: syncmaster
1 Replies

2. 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

3. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

4. Web Development

Deny from env=env-variable Does not work

(Above from Apache docs). On my system, using: SetEnvIf User-Agent Mozilla IsBad=1 Order allow,deny Allow from all Deny from env=IsBad ...I see that environment variable is set (using phpinfo()) but the page is still served. No errors in the Apache logs. (1 Reply)
Discussion started by: gnurob
1 Replies

5. UNIX for Dummies Questions & Answers

How to allow access to some commands having root privleges to be run bu non root user

hi i am new to unix and i have abig task. i have to \run particular commands having root privileges from a non root user. i know sudo is one of the way but i need sum other approach kindly help Thanks (5 Replies)
Discussion started by: suryashikha
5 Replies

6. AIX

Can't login root account due to can't find root shell

Hi, yesterday, I changed root's shell in /etc/passwd, cause a mistake then I can not log in root account (can't find correct shell). I attempted to log in single-mode, however, it prompted for single-mode's password then I type root's password but still can not log in. I'm using AIX 5L version 5.2... (2 Replies)
Discussion started by: neikel
2 Replies

7. Solaris

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... (4 Replies)
Discussion started by: alanlh
4 Replies

8. Shell Programming and Scripting

Adding command line env in cron env

Hello friends, i run two scripts manually & they work. i run them in cron & they don work. how to match the two env's 1.command line env 2.cron env i would like cron to use command line env. Thanks & Regards Abhijeet (1 Reply)
Discussion started by: abhijeetkul
1 Replies

9. UNIX for Dummies Questions & Answers

Run non-root script as root with non-root environment

All, I want to run a non-root script as the root user with non-root environment variables with crontab. The non-root user would have environment variables for database access such as Oracle or Sybase. The root user does not have the Oracle or Sybase enviroment variables. I thought you could do... (2 Replies)
Discussion started by: bubba112557
2 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