Onde o termo "superusuário" se originou?
su allows one to become the super--user, who has all sorts of marvelous powers.
Na página man Primeira Edição do Unix :
11/3/71 SU (I)
NAME su -- become privileged user
SYNOPSIS su password
DESCRIPTION su allows one to become the super--user, who has all sorts
of marvelous powers. In order for su to do its magic, the
user must pass as an argument a password. If the password
is correct, su will execute the shell with the UID set to
that of the super--user. To restore normal UID privileges,
type an end--of--file to the super--user shell
FILES
SEE ALSO shell
DIAGNOSTICS "Sorry" if password is wrong
BUGS
OWNER dmr, ken
Fonte minnie.tuhs.org/UnixTree/V5/ usr / source / s2 / su.c.html
su
é usado em sistemas Unix para alterar o usuário e é comumente usado para executar comandos como o usuário root.
E ... leia em
I had another foundation shaking moment with the meaning of "su". I found some old Unix source code, where su.c was available. Curious, I looked at the source. What did I find?
/* su -- become super-user */ char password[100]; char pwbuf[100]; int ttybuf[3]; main() { register char *p, *q; extern fin; if(getpw(0, pwbuf)) goto badpw; (&fin)[1] = 0; p = pwbuf; while(*p != ':') if(*p++ == '%bl0ck_qu0te%') goto badpw; if(*++p == ':') goto ok; gtty(0, ttybuf); ttybuf[2] =& ~010; stty(0, ttybuf); printf("password: "); q = password; while((*q = getchar()) != '\n') if(*q++ == '%bl0ck_qu0te%') return; *q = '%bl0ck_qu0te%'; ttybuf[2] =| 010; stty(0, ttybuf); printf("\n"); q = crypt(password); while(*q++ == *p++); if(*--q == '%bl0ck_qu0te%' && *--p == ':') goto ok; goto error; badpw: printf("bad password file\n"); ok: setuid(0); execl("/bin/sh", "-", 0); printf("cannot execute shell\n"); error: printf("sorry\n"); }
What is the first comment in that C file?
/* su -- become super-user */
su
was written to only change to the root user on the system. It wasn't designed to switch to any other user that has an account. "su" meant "super-user". I need to sit down for a second.The code above comes from the fifth edition of Unix by Dennis Ritchie and Ken Thompson. If you know your Unix history, it really wasn't until the sixth edition that things really started taking off for the Unix world. So, it's safe to say that most, if not all, of the code in the fifth edition and prior were written by Dennis and Ken themselves. Fifth edition Unix released in 1975, so it doesn't get much more authoritative than that.
Fonte Aaron Toponce: O significado de 'su'