edit user

Zhang Lei zhl at nanjing-fnst.com
Tue Mar 15 09:25:03 UTC 2005


Perhaps you may write a shell script to help you edit /etc/passwd.


Regards
Zhang Lei

----- Original Message ----- 
From: "Muhammad Rizwan" <rizwan at nixpanel.com>
To: "General Red Hat Linux discussion list" <redhat-list at redhat.com>
Sent: Tuesday, March 15, 2005 2:33 PM
Subject: RE: edit user


>
> Yes, i already check man page for usermod.
> The problem is Linux dont allow users with dot. like rizwan.khan.
> This is the result of your suggested command:
> [root at Rizwan root]# usermod -l rizwan1.khan rizwan1
> usermod: invalid field `rizwan1.khan'
>
> Any idea, how can i add users with dot without editing /etc/passwd file
> myself.
>
> Thanks
>
>
>
> On Tue, 2005-03-15 at 00:11, Michael Velez wrote:
>> Usermod will allow you to change the login username.
>>
>> Example:
>> usermod -l rizwan.khan rizwan
>>
>> Where rizwan.khan is the new usename and rizwan is the old.  You can find
>> complete documentation to the usermod command by typing the following
>> command:
>>
>> man usermod
>>
>> Hope this helps,
>> Michael
>>
>> > -----Original Message-----
>> > From: redhat-list-bounces at redhat.com
>> > [mailto:redhat-list-bounces at redhat.com] On Behalf Of Muhammad Rizwan
>> > Sent: Monday, March 14, 2005 8:20 AM
>> > To: General Red Hat Linux discussion list
>> > Subject: RE: edit user
>> >
>> >
>> > Thanks for your reply.
>> >
>> > Another question is that, is it possible to edit the user's
>> > login name with .name. For example if i have added user name
>> > as rizwan, but now can i edit this user name as rizwan.khan.
>> > One solution is to edit /etc/passwd file, but i don't want to
>> > do this because in this way User Manager component of Linux
>> > can corrupt. Can you please suggest me other solution?
>> >
>> > Thanks
>> >
>> > On Mon, 2005-03-14 at 13:59, Michael Velez wrote:
>> > > > -----Original Message-----
>> > > > From: redhat-list-bounces at redhat.com
>> > > > [mailto:redhat-list-bounces at redhat.com] On Behalf Of
>> > Muhammad Rizwan
>> > > > Sent: Monday, March 14, 2005 3:05 AM
>> > > > To: General Red Hat Linux discussion list
>> > > > Subject: edit user
>> > > >
>> > > > Hello
>> > > >
>> > > > Is it possible to edit full name of system user through
>> > command line?
>> > > >
>> > > > Any idea?
>> > > >
>> > > > Thanks
>> > > >
>> > > > --
>> > > > redhat-list mailing list
>> > > > unsubscribe
>> > > > mailto:redhat-list-request at redhat.com?subject=unsubscribe
>> > > > https://www.redhat.com/mailman/listinfo/redhat-list
>> > > >
>> > >
>> > > There are two ways edit the name of a user
>> > >
>> > > If you want to change the full name of user foo:
>> > >
>> > > usermod -c "New Name" foo
>> > >
>> > > Or
>> > >
>> > > chfn -f "New Name" foo
>> > >
>> > > If you need to do more complex pattern changes, you should use the
>> > > stream editor 'sed'.  However, I think the above would
>> > satisfy what you need.
>> > >
>> > > Documentation exists on both these commands in the man pages.
>> > >
>> > > Michael
>> >
>> > --
>> > redhat-list mailing list
>> > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
>> > https://www.redhat.com/mailman/listinfo/redhat-list
>> >
>
> -- 
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list 




More information about the redhat-list mailing list