Sourcing .profile when doing ksu

Cy Schubert - CITS Open Systems Group Cy.Schubert at
Wed Jun 12 09:52:06 EDT 2002

In message <793275208AE1D4119254001083FA1321088A1A4A at mem-exch-ntfs6.upbn>,
 "McClain, Luke" writes:
> When doing a ksu, how do you get it to source the users profile you are
> changing to. When we do it it changes the UID and
> keeps you in the current users home dir with that users profile.

This is nothing fancy but it works.  I and my team use this on our 
FreeBSD and Linux desktop systems.

#!/bin/sh -
case $0 in
*/root)         exec /usr/local/bin/sudo /usr/bin/su -;;
*/nroot)        exec /usr/local/krb5/bin/ksu -e /usr/bin/su -;;

However this is a better approach when connecting to a remote system,

	rlogin -x -l root HOSTNAME


	telnet -axl root HOSTNAME

Cheers,                          Phone:  250-387-8437
Cy Schubert                        Fax:  250-387-5766
Team Leader, Sun/Alpha Team      Email:  Cy.Schubert at
Open Systems Group, CITS
Ministry of Management Services
Province of BC            
                    FreeBSD UNIX:  cy at

More information about the Kerberos mailing list