Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
Changing Login name
Results 1 to 2 of 2

Thread: Changing Login name

  1. #1

    Changing Login name

    Is it possible to change Login name, much as 'passwd' can change passwords? or is there a utility which can do this?

  2. #2
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re:Changing Login name

    Make sure you'r new username will have the same UID/GID as the old one, else the files you've created as the old user won't be owned by you anymore..

    From the top of my head, I would say try it like this:
    # > grep ^old_user_name /etc/passwd | sed 's/:/ /g' | awk '{print "UID: " $3 " GID: " $4}'
    # > userdel old_user_name
    # > adduser -d home_dir -u <UID> -g <GID> -M new_user_name
    # > passwd new_user_name

    -- Edit --
    Just saw in the man page for usermod..
    # > usermod -l new_user_name old_user_name
    does what you want.

Similar Threads

  1. single user login. no login at startup
    By donovan in forum Linux - General Topics
    Replies: 3
    Last Post: 01-12-2005, 08:57 AM
  2. Changing from XDM
    By mmiller9 in forum Linux - Software, Applications & Programming
    Replies: 3
    Last Post: 03-10-2003, 12:39 PM
  3. Changing user login to GUI
    By rolltidega in forum Redhat / Fedora
    Replies: 4
    Last Post: 10-16-2002, 08:23 PM
  4. changing paths
    By mountainman in forum Linux - Software, Applications & Programming
    Replies: 6
    Last Post: 02-27-2002, 03:44 AM
  5. Changing Keyboard in KDE
    By spuhler in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 11-06-2001, 12:40 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •