profile question

profile question

Post by Tom » Thu, 22 May 2003 19:27:41



hi,

I changed the shell of root user to /bin/ksh using chsh (I use OpenBSD 3,2)
When I add to PATH /usr/local/sbin/ to root`s profile in /root/.profile
"
PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:.
"
it does not work. When I try to use TAB key to autofill names of the files
from /usr/local/sbin/ it is not working ?
Where should I change to force loading of the new profile ?

regards,
Tom

 
 
 

profile question

Post by p.. » Thu, 22 May 2003 19:30:37



> hi,
> I changed the shell of root user to /bin/ksh using chsh (I use OpenBSD 3,2)
> When I add to PATH /usr/local/sbin/ to root`s profile in /root/.profile
> "
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:.
> "
> it does not work. When I try to use TAB key to autofill names of the files
> from /usr/local/sbin/ it is not working ?
> Where should I change to force loading of the new profile ?

Nowhere. Don't change root's shell, login as "ordinary user" and use sudo

Quote:> regards,
> Tom

--
Peter H?kanson        
        IPSec  Sverige      ( At Gothenburg Riverside )
           Sorry about my e-mail address, but i'm trying to keep spam out,
           remove "icke-reklam" if you feel for mailing me. Thanx.

 
 
 

profile question

Post by Tom » Thu, 22 May 2003 19:59:35


Quote:

> Nowhere. Don't change root's shell, login as "ordinary user" and use sudo

> --
> Peter H?kanson

I always login to root using su from ordinary user.

Tom

 
 
 

profile question

Post by Benoit Iza » Thu, 22 May 2003 21:07:09


Hello,



Quote:> I always login to root using su from ordinary user.

Does it work with `su -'?

--
Benoit Izac

 
 
 

profile question

Post by p.. » Thu, 22 May 2003 22:08:59



>> Nowhere. Don't change root's shell, login as "ordinary user" and use sudo

>> --
>> Peter H?kanson
> I always login to root using su from ordinary user.

su -l ?

this is needed to start a 'login shell'
     -l      Simulate a full login.  The environment is discarded except for
             HOME, SHELL, PATH, TERM, and USER.  HOME and SHELL are modified
             as above.  USER is set to the target login.  PATH is set to
             ``/bin:/usr/bin''.  TERM is imported from your current environ-
             ment.  Environment variables may be set or overridden from the
             login class capabilities database according to the class of the
             target login.  The invoked shell is the target login's, and su
             will change directory to the target login's home directory.
             Resource limits and session priority are modified to that for the
             target account's login class.

I do think however that sudo has a greater flexibility to spawn
a shell AND give the '-i' flag to the shell

( me thinks bash is infinitly better then ksh, but thats my personal taste)

Quote:> Tom

--
Peter H?kanson        
        IPSec  Sverige      ( At Gothenburg Riverside )
           Sorry about my e-mail address, but i'm trying to keep spam out,
           remove "icke-reklam" if you feel for mailing me. Thanx.
 
 
 

profile question

Post by mr_sca » Fri, 23 May 2003 01:08:18



said the following:


>>> Nowhere. Don't change root's shell, login as "ordinary user" and use sudo

>>> --
>>> Peter H?kanson

>> I always login to root using su from ordinary user.

>su -l ?

>this is needed to start a 'login shell'

Who said anything about 'su -l' ?
 
 
 

profile question

Post by Stephen Paskalu » Fri, 23 May 2003 01:44:35




> said the following:
>>su -l ?
> Who said anything about 'su -l' ?

The person you quoted ...

--
Stephen Paskaluk

 
 
 

profile question

Post by Stephen Paskalu » Fri, 23 May 2003 01:50:10






>> said the following:

>>>su -l ?

>> Who said anything about 'su -l' ?

> The person you quoted ...

On a more serious note, I think he was asking if the OP used su -l
when he uses su become root.

--
Stephen Paskaluk

 
 
 

profile question

Post by Magu » Sun, 25 May 2003 06:22:37




Quote:> hi,

> I changed the shell of root user to /bin/ksh using chsh (I use OpenBSD
> 3,2) When I add to PATH /usr/local/sbin/ to root`s profile in
> /root/.profile "
> PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:.
> "
> it does not work. When I try to use TAB key to autofill names of the
> files from /usr/local/sbin/ it is not working ?
> Where should I change to force loading of the new profile ?

> regards,
> Tom

I _think_ that you may have to make a .kshrc file and then add a line to
.profile to pick up environment stuff from there also.

(From memory because I'm on a Windoze box ATM)

You could try putting this in your ~/.profile

ENV=$HOME/.kshrc
export ENV

and then add your PATH= environment to ~/.kshrc as well as .profile.

Log out and in again, or  run a '. .profile'

HTH - I'd be interested to know if it makes any difference

M.

 
 
 

1. .profile questions

I'm running HP-UX 9.07 and I'm having a problem
with my .profile.  First when I bring up a new
hpterm my .profile is not executed and second when
I run it from the command line runs but then there
is a logout message and none of the settings stay.  
Any help in this will be most appreciated.
--

John T. Shea

To reply remove the nospam from my address.

2. Adding a third IDE hard drive

3. a .profile question about the xenix vsh

4. HDLC Controller

5. .profile question

6. Installation of Hard Disk

7. HPUX 10.2 /etc/profile question

8. Inactivity Timer

9. bash .profile questions

10. samba pdc and profiles question

11. profile question

12. .profile question

13. Profile question.