De onde surgiu o termo “superusuário”?

55

Onde o termo "superusuário" se originou? É um encurtamento do "usuário supervisório", ou é apenas um indicador do nível de poder que um usuário desse tipo detém em um sistema?

    
por VortixDev 21.01.2018 / 00:53

2 respostas

55

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'

Leitura adicional

por 21.01.2018 / 01:12
36

OED (paywalled) fornece a seguinte etimologia:

super- prefix + user n.

O exemplo mais antigo que eles listam é de K. Thompson & D. M. Ritchie (1971): "Homem do programador do Unix.":

Only the super-user may invoke this command.

    
por 21.01.2018 / 20:01