Como posso adicionar um novo usuário para o login da GUI?

1

Eu adicionei um novo usuário via terminal usando o comando useradd no Ubuntu:

useradd -u 210 -g dba -s /bin/bash -d /home/oracle -m oracle

Eu posso entrar neste novo usuário via terminal. Mas eu quero janela de login para este novo usuário quando eu inicializar o meu sistema para que eu possa fazer login diretamente para este usuário para minhas tarefas específicas. Como conseguir isso, por favor?

    
por Ravi 11.01.2016 / 16:17

1 resposta

1

De acordo com o Linux Standard BAse :

The system User IDs from 0 to 99 should be statically allocated by the system, and shall not be created by applications.

The system User IDs from 100 to 499 should be reserved for dynamic allocation by system administrators and post install scripts using useradd.

Assim, usuários regulares devem ter UIDs > 499. Além disso, a Política Debian afirma que:

0-99:

Globally allocated by the Debian project, the same on every Debian system. These ids will appear in the passwd and group files of all Debian systems, new ids in this range being added automatically as the base-passwd package is updated.

Packages which need a single statically allocated uid or gid should use one of these; their maintainers should ask the base-passwd maintainer for ids.

100-999:

Dynamically allocated system users and groups. Packages which need a user or group, but can have this user or group allocated dynamically and differently on each system, should use adduser --system to create the group and/or user. adduser will check for the existence of the user or group, and if necessary choose an unused id based on the ranges specified in adduser.conf.

1000-59999:

Dynamically allocated user accounts. By default adduser will choose UIDs and GIDs for user accounts in this range, though adduser.conf may be used to modify this behavior.

Isso também se aplica ao Ubuntu, uma vez que é baseado no Debian. Eu não encontrei uma menção explícita a isso, mas, em geral, os usuários do sistema não têm permissão para efetuar login graficamente e, muitas vezes, não podem efetuar login. Portanto, o motivo pelo qual seu usuário não pôde efetuar login foi que você escolheu um UID que era muito baixo.

Adicionalmente, no mundo Debian, recomenda-se usar adduser e não useradd ao criar contas. De man useradd :

useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.

Tudo isso é para dizer que i) você deveria ter usado um UID > = 1000 e ii) apenas use adduser e aceite os padrões e tudo será configurado como você espera.

    
por 12.01.2016 / 10:52