1

While using a shared username, how can a script automatically detect whether or not it is me logging in?

view story
linux-howto

http://serverfault.com – I have a shared login on a linux server, where multiple people are logging in using the same username (unorthodox, I know). Whenever I log in I source my own bash_profile in a subdirectory (e.g. cd my/sub/dir; . .bash_profile). I've set it up this way in case I someday get a separate login. In the meantime however, it would be very convenient if I could have $HOME/.bash_profile automatically determine it was me and source my personal bash_profile. I use SSH keys to log in, so I would imagine this could be done by looking at which key was used to log in. Possibly there is another way? I don't (HowTos)