Mailing List
Home
Linux - General Red Hat Linux discussion list
Enterprise Linux 3 - Discussion of Red Hat Enterprise Linux 3 (Taroon)
Installation - Getting started with Red Hat Linux
Red Hat Linux 9 - Discussion of Red Hat Linux 9 (Shrike)
Red Hat Linux 7.3 - Discussion of Red Hat Linux 7.3 (Valhalla)
Red Hat Linux 7.2 - Discussion of Red Hat Linux 7.2 (Enigma)
Apache Web Server
Oracle database, Microsoft SQL server ...
Subjects
application/x mplayer2 plugin
RPM error: db4 error(16) from dbenv >remove: Device or resource
   busy
Command stream end of file while reading
X Windows problem (xauth)
Upgrading openoffice 1 1 rpm
FTP: connection refused
FTP: connection refused
mount: /dev/cdrom: is not a valid block device
Dell Precision 650, RedHat 9, no sound
how to trace the cause resulting in the crash of bind server
Virus on the list
UNINSTALL RPM MYSQL
usb pen drives: mounting as a user
broadcom network interface
make mrproper
sendmail configuration on redhat
Couldn 't open PID file /var/run/named/named pid Permission denied
Promise 378 controller
kernel 2 6 and /dev/sound/mixer not found
Problem using up2date
mrtg step by step howto/configuration for a newbie?
Compiling and Installing Kernel 2 6
Can 't locate module ppp0, can 't locate module ppp compress 21
HOW I CAN MAKE BOOTABLE FLOPPY DISKET
Lotus Notes under Wine
/etc/security/limits conf question
Intel E/1000 driver
Command stream end of file while reading
rpm database corrupt
qla2300 modules
 
Search:  
Power your search with and, or, +, -, or "some phrase" operators.
edit user

edit user

2005-03-15       - By Michael Velez

 Back
Reply:     1     2     3     4     5     6     7     8  

Which Red Hat version are you using? I tried it on Red Hat Enterprise 3 (I
haven 't upgraded to 4 yet) and it works fine.

Your Red Hat version may accept '. ' in the login name but the shell command
may get confused with the '. '

Try the following:

usermod -l 'rizwan1.khan ' rizwan1

If this does not work, there is nothing wrong with editing the /etc/passwd
file manually. This will not corrupt other login programs. Try it. If you
cannot login or su to that username then your system will not allow '. ' in
the login name.

If you can login with a '. ' in the username and you want to put all this in
a script (instead of editing manually), use the 'sed ' command (stream
editor) to edit the /etc/passwd. You can use the following commands after
you have created a user called rizwan1khan:

cat /etc/passwd | sed {s/rizwan1khan/rizwan1.khan/} > /etc/passwd

You may want to verify that permissions on /etc/passwd are accurate after
this and reset them. Depending on what the root umask is set to, you may
end up with permissions you do not want.

Michael

> -- --Original Message-- --
> From: redhat-list-bounces@(protected)
> [mailto:redhat-list-bounces@(protected)] On Behalf Of Muhammad Rizwan
> Sent: Tuesday, March 15, 2005 1:34 AM
> To: General Red Hat Linux discussion list
> 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@(protected) 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@(protected)
> > > [mailto:redhat-list-bounces@(protected)] 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@(protected)
> > > > > [mailto:redhat-list-bounces@(protected)] 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@(protected)?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@(protected)?subject=unsubscribe
> > > https://www.redhat.com/mailman/listinfo/redhat-list
> > >
>
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@(protected)?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list