dragora-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dragora-bug] Howto: add user


From: Gustavo C. M.
Subject: Re: [Dragora-bug] Howto: add user
Date: Thu, 28 Mar 2013 15:03:50 -0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130308 Thunderbird/17.0.4

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Also, remember that the "owner" of your files is not "tux", but its UID
in your previous system, which, according to useradd(8), is "the
smallest ID value greater than 999 and greater than every other user".
You can discover which is it by long listing (ls -n) any directory whose
files the user owned, and pass that number to useradd with the parameter
"-u". For example, I have this .bashrc:

$ ls -n .bashrc
- -rw------- 1 1002 1002 8417 Mar 19 15:45 .bashrc

The first field is the file permissions; the second, its "quantity" (if
a directory, will be the number of items it contains); the third is the
UID (User ID); the fourth, the GID (Group ID, you can pass it to useradd
with -g); the fifth, it's size in bytes (you can use -h in ls to change
it to human-readable format); the fifth, the date (Mar 19 15:45, here);
the sixth, the file.

So, adding -u with that number of mine to the command Marek Buras
teaches you, it would be:

useradd -d /home/tux -m -s /bin/bash -c "Tux User" -u 1002 -g users -G
audio,video,cdrom,power,plugdev,netdev tux

In my computer, the group "users" has GID 100; it is a default group in
the system. The owner of my home directory is a group I created for
myself, hence the 1002 GID. You can add a personalized group with
"groupadd -g GID group_name".

Em 28-03-2013 12:05, Marek Buras escreveu:
> Hi!
> 
> Dnia 2013-03-28, czw o godzinie 10:45 -0100, address@hidden pisze:
> 
>> how to handle the user name tux in dragora?
> 
> adduser is a script which in the end calls useradd command (as far as I
> remember), so maybe you should look at useradd? I always use this
> command while adding users. For example, if you want to add this "tux"
> user to your system try this:
> 
> useradd -d /home/tux -m -s /bin/bash -c "Tux User" -g users -G
> audio,video,cdrom,power,plugdev,netdev tux
> 
> Where:
> 
> -d - default home directory (appending -m tells useradd to create the
> directory)
> -s - default shell for the user
> -c - comment
> -g - main group for the user
> -G - additional groups - if the user is a member of them, he has
>      access to particular subsystems/features
> 
> Of course you should set password for tux: passwd tux
> 
> You can find a lot of information in: man useradd, man passwd
> 
> Happy hacking!
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iQIcBAEBAgAGBQJRVIX8AAoJEN9QbufXvqzWJKQP/Ai7YeIS06zjJ0hzb92ZM58P
4pzBkHzvCxNrf2nU2RfYP1kbavYQlipIIZolfd83G7CxejtqD8Hl3Ou0f63Z1ATK
ZYs0FlQ4t96PVnfJbnC90pj0gl+llZnwNAS1vRuLy7F/Kg/wc2Gu49VF0IFspN49
1PfcOG7rj8qSGLVgVsU0knJBz2wCKyUnu2zjlIAzygEpHM2j7su2hibzkD8tRbty
IMElMM4LF0/Zeh50ClBTjer/Sfj1Mr/FZbcPF9/lDJ6uCSOAQG9tv6wA7h9rNTQp
uEzNwNo+zx4gfY6j0SVH6PJt53TSyjqwKuquh8Kv3jfforeCxkdevWtuSbGToavj
8H/P5sVHbNeKTDj5h8SOapjJOv4o+Ua5n8Mt/kchL9tWgFsr/b2BC18pfhBhKTEA
exJ6kSJfJ/i6Udd6ePvaycaMMEGXVQ/lbxCqLRHQ1N0SghSEz0fbLKAiAgVdOMvi
hPCVwEFRro/kAa/C1SLhScdaJgZKhkUbXzLvPX+QKQYKqbxTIwSkF/qNkRLTutlm
0YlX3E8gtyoj73MMhXAlnIm9ZsGd1GOSd8VKBukVLeU4mNP9ScPmPxZ0mG2GB2xV
JB265Z3vfYjxgO+mDw383rFCnhdNnZ2H65jYZEI4OUBQ2KZuXy+v48Cu7G4fR6EH
QeA2vdDqhdJ+sieuTcfP
=0/1r
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]