Sourcing .profile when doing ksu
Cy Schubert - CITS Open Systems Group
Cy.Schubert at uumail.gov.bc.ca
Wed Jun 12 09:52:06 EDT 2002
In message <793275208AE1D4119254001083FA1321088A1A4A at mem-exch-ntfs6.upbn
a.com>,
"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 -;;
esac
However this is a better approach when connecting to a remote system,
rlogin -x -l root HOSTNAME
or
telnet -axl root HOSTNAME
--
Cheers, Phone: 250-387-8437
Cy Schubert Fax: 250-387-5766
Team Leader, Sun/Alpha Team Email: Cy.Schubert at osg.gov.bc.ca
Open Systems Group, CITS
Ministry of Management Services
Province of BC
FreeBSD UNIX: cy at FreeBSD.org
More information about the Kerberos
mailing list