> This is a somewhat frivolous bug, but my friends and I are wondering why > su defaults to user 'root' instead of to Unix user id 0. That is, if I > change the user name of the Unix account with id 0, su no longer > defaults correctly to that user name. > > Any thoughts on the rationale behind this implementation decision?
Some things are that way because they have always been that way. The su command has always done it that way and has been documented like that for a long time. Probably for no good reason. But no compelling reason to change it either. Defaulting to uid 0 would probably be more valid. I can guess that the rationale went like this. "'su user', look up user with getpwnam(), extract uid, setuid(newuid). Hmm... What to do as a default so that I can switch to root. I know, if no user is specified then switch in 'root' right at the front of that process and then nothing later needs to change!" And so it goes. This discussion is off topic for the bug list. I suggest you ponder this further on the comp.misc.discuss news group. Bob _______________________________________________ Bug-sh-utils mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-sh-utils
