2008/3/4 Gustavo Rezende <[EMAIL PROTECTED]>:

> Agradeço a todos pela atenção e pelas informações. Resolvi o problema de
> uma
> outra forma: por sorte tenho em casa um outro computador com o Linux
> instalado, então verifiquei quais eram os grupos aos quais eu pertencia lá
> e
> inseri-me neles editando o arquivo /etc/group. Agora a dúvida quanto ao
> comando "usermod -G grupo usuário" permanece: esse comando tem por padrão
> apagar todos os meus grupos, exceto o grupo principal e o que eu estou
> inserindo no momento?


Retirado do man usermod:

-g, --gid GROUP
          The group name or number of the user's new initial login group.
The group name must exist. A group number must refer to an already existing
group. The default group number is 1.

       -G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
          A list of supplementary groups which the user is also a member of.
Each group is separated from the next by a comma, with no intervening
whitespace. The groups are subject to the same restrictions as the group
given with the -g option. If the user is currently a member of a group which
is not listed, the user will be removed from the group. This behaviour can
be changed via -a option, which appends user to the current supplementary
group list.

 O texto da ajuda diz que a opção -g seta o grupo principal do usuário. A
opção -G seta outros grupos aos quais ele pode pertencer. Ele diz que
(tradução minha):

 "Se o usuário é atualmente um membro de um grupo que não for listado, o
usuário será removido do grupo. Este comportamento pode ser mudado usando-se
a opção -a, que adiciona o usuário à lista atual de grupos suplementares"

 Então, se você quer adicionar um usuário a mais um grupo, você deve usar a
opção -a além da -G:

# usermod -a -G grupo


>
> --
> Interessado em aprender mais sobre o Ubuntu em português?
> http://wiki.ubuntu-br.org/ComeceAqui  -
> ubuntu-br mailing list
> ubuntu-br@lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-br
>



-- 
Humberto Xis
[EMAIL PROTECTED]
[EMAIL PROTECTED]
http://xisberto.blogspot.com
http://ostelematicos.blogspot.com

"Sur la tuta tero estis unu lingvo kaj unu parlomaniero." - Gn 11,1
-- 
Interessado em aprender mais sobre o Ubuntu em português?
http://wiki.ubuntu-br.org/ComeceAqui  -
ubuntu-br mailing list
ubuntu-br@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-br

Responder a