/* testsh2.c */ #include #include int main(int argc, char** argv) { int i = 0; for (;i < argc; i++) { printf("argv[%d]: %s\n", i, argv[i]); } exit(0); } #### root@aster /tmp# cat /etc/redhat-release Red Hat Enterprise Linux Server release 5.8 (Tikanga) root@aster /tmp# cat /etc/passwd| grep paultest paultest:x:401:401::/home/paultest:/tmp/testsh2 #### root@aster /tmp# su - paultest argv[0]: -testsh2 root@aster /tmp# su paultest argv[0]: testsh2