On Thu, Jan 8, 2009 at 3:49 AM, Shibin k.reeny <[email protected]> wrote:
> using usermod command we can change the user name that is login name
> usermod -l newname currentusername
> but how to change the entire GECOS information like real name,name the home
> directory,group etc...
> at command prompt.
>
login name and home directory are not in the GECOS fields of the
/etc/password file.
chfn command will change the GEFOS fields
" man chfn " for more information and how to change each field.
Real name and other GECOS fields can simply be changed, no problem
use any text editor to do it. BETTER USE chfn comamnd.
to change login name Edit /etc/passwd
"man 5 passwd" will give more information about the structure of
/etc/passwd file.
to change the login directory
1.. create a directory in /home or anywhere as mentioned in the
/etc/passwd file (field 6)
2. name of the directory should match the login name (field No 1)
(Directory name can be different, but this will create confusion)
UID of the directory should match the UID mentioned in the
/etc/password file (field3)
3. create a group
if using debian or ubuntu use the command groupadd
/etc/group file contains all groups and their GID (field 3)
Change owner and group of the directory to that of the user id (UID)
mentioned in the /etc/passwd file and groupID (GID) mentioned in the
/etc/group file (field No 3).
Please note that kernel will identify the users by their UID and GID
of the users and not by their login name.
with regards
M.Balakrishna Pillai
if using debian or ubuntu
use the command adduser
adduser loginname:loginname path to the newly created directory
_______________________________________________
Mailinglist mailing list
[email protected]
http://ilug-cochin.org/mailman/listinfo/mailinglist_ilug-cochin.org