This site will look much better in a browser that supports web standards, but it is accessible to any browser or Internet device.

gsu command »


Q: What is the "gsu" program, anyway?

gsu allows a user to temporarily use a different user ID. It is much like the su(1) command most people are familiar with. This is generally used for group accounts.

However, it asks for your password, not that of the user you are trying to switch to.

Q: How do I use gsu?

Use the following steps: (Note: This example assumes that you are logging into an account called gsutemp.)

  1. Login to an ICS UNIX system using your ICS login.
  2. gsu gsutemp
  3. When prompted for a password, enter your ICS UNIX password.
  4. cd ~gsutemp
  5. When you are finished working as gsutemp, type exit to return to your original shell.

Q: How do I access the GSU account's directory?

You can access the directory via samba very similar to how your access your home directory. You can hit Start/Run and enter "\\troll.ics.uci.edu\gsutemp" Where gsutemp is the account name you are trying to access.

If you are not already attached to the UCI-ICS domain, you will need to authenticate yourself. Also samba shares are not available outside of the physical ICS wired networks. You will need to use the VPN to access a samba share from outside ICS.

Q: I've been told I have access to a group or gsu account. What's the password?

Use your ICS UNIX account password.

Q: I don't have an ICS account. Can I still gsu to an ICS group account?

No. Since you must first be logged into an ICS UNIX system, you need an ICS login account. Your EA account will not work.

Q: When I use gsu, I get a message saying ".cshrc: Permission denied"

The group account does not have read/execute permission for your .cshrc file in your home directory. If you want the commands in your .cshrc file to be executed, you will need to change the permissions on it (and possibly) on your home directory. See the man page for chmod for more information.

Q: When I gsu, and do an ls, I get the error message ".: Permission denied". How do I fix this?

The gsu account does not have read/execute permission for your home directory. You will either need to use chmod to change your home directory's permissions, or cd to the gsu account before using the gsu command.

Q: I get confused about which window I have gsu'ed in. How can I tell when I've gsu'ed to another user?

Set up your .cshrc to do the following test:

if ($?prompt) then

  set username=`/usr/ucb/whoami`
  switch ($username)

    case ${USER}:
	set prompt = "${USER}@`rprompt %h`% "
        breaksw

    case gsutemp:
        set prompt="`rprompt %s${username}:--%s%b`"
        breaksw

    default:
        set prompt="`rprompt %s${username}-${USER}:--%s%b`"
  endsw
endif
            
This example uses a different style prompt for each user, again using gsutemp as an example gsu account.

An example of this code fragment is available at /opt/local/etc/skel/acct/cshrc.

Q: How can I run applications on my workstation from my gsu account?

You need to configure your Xauthority file properly. See the xauth man page or Using Xauth for a more detailed explanation.
Q: Where can I find more information on gsu?

See man gsu for general information.