Find the answer to your Linux question:
Results 1 to 8 of 8
Hi! I have been trying to set-up CentOS in Vbox to set-up Zone Minder this past days. After reboot, I tried to log in as "user" but every time I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272

    Cannot Log In w/ Username


    Hi!

    I have been trying to set-up CentOS in Vbox to set-up Zone Minder this past days.

    After reboot, I tried to log in as "user" but every time I type my password, I can't get in. It would just blink and ask me username again. However, I log in as root > root passwd and it brings me in. It's all CLI by the way.

    I checked and my username still is in /home/username. I tried to change username passwd but still the problem is persistent. I only can log in as root though

    This is my first encounter with servers so I don't really know what commands to execute and how to correct.

    Thanks!

    EDIT: Now it says log in incorrect. I tried to change passwd of user as root and it says user does not exist. When I try to useradd same user, it says it already exist :confused"
    Last edited by nujinini; 09-22-2010 at 10:16 AM.
    nujinini
    Linux User #489667

  2. #2
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    Don't know the Red Hat thing, but normally there is an utility to edit users, vipw.

  3. #3
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Thanks!

    my username is there in the last line

    jun:500:500::/home/jun:/bin/bash
    Aside from reading this, I don't have any idea how to go about
    nujinini
    Linux User #489667

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    May 2007
    Posts
    72
    My approach would be:
    ls -al /home to check the ownership and permissions of the home directory. If they are screwed
    Code:
     chown -R user:user /home/user
    chmod -R 755 /home/user
    cat /etc/passwd and /etc/group to see if there is anything grossly wrong.
    If the above doesn't sort it out:
    Code:
    useradd -m -u 1005 user2
    to add another user with a different name and uid
    Code:
    visudo
    and then uncomment the line wheel ALL=(ALL) ALL or add the line user2 ALL=(ALL) ALL in order to give user2 sudo privileges (if you have sudo)
    Copy any stuff you need from the home folder of user1
    userdel -r user
    You can then carry on with user2 or else add user1 again

  6. #5
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    #useradd -m -u 1005 jun
    vipw lockfile (/etc/ptmp) is present
    I tried the above and got this output. May I know what it means please?
    nujinini
    Linux User #489667

  7. #6
    Linux Engineer Segfault's Avatar
    Join Date
    Jun 2008
    Location
    Acadiana
    Posts
    877
    Probably it means last vipw session wasn't closed properly, remove the lockfile and try again.

  8. #7
    Just Joined!
    Join Date
    May 2007
    Posts
    72
    Did you have vipw running at the time?

  9. #8
    Linux Engineer nujinini's Avatar
    Join Date
    Apr 2009
    Posts
    1,272
    Hello impert & Segfault,

    I tried to work on the issue but it seems that the more I try to make a solution the more I get lost

    Since this is my first server install, ever. I decided to do it in the most practical way I can think of....fresh reintall!

    I seem to be doing better this time. Its my 4th attempt and so far it seems that I'm doing relatively well and have not yet encountered any issues. 80 % done...

    In a way I feel happy since this was the same way I felt when I started learning linux last year. The "Destroy and fix. Destroy and fix." approach seems to be working best for me as far as learning is concerned.

    Thanks for your time guys!
    nujinini
    Linux User #489667

Posting Permissions

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