Thread: root's profile
View Single Post

   
  #2 (permalink)  
Old 01-05-2008, 11:31 AM
Kevin Bowling
 
Posts: n/a
Default Re: root's profile

sghani73@gmail.com wrote:
> Hi,
>
> I want to source root's profile whenever any user switch to root...so
> in essence I want to impose the behaviour of su - even if the user
> only do su to root (with out the - )
>
> How can this be done if possible...I played a bit around with alias
> but then give up...
>
> let me know
>
>
> Thanks
>


A strange request but I have an idea. How about moving su to a new
location like /bin/su.real and in its place putting a shell script. The
script would need to parse any command line arguments you'd like to
pass and then call `su.real - {optional username/args/etc}`.

Kevin
Reply With Quote