absolute BEGINEERS question

Posted on 2004-11-06
Last Modified: 2013-12-15
Please bear with me.....this is my first time

I'v just installed Red Hat 9 on my system.

I did it in custom mode coz I wanted all development tools(perl modules to php and everything in between)

The installation went off fine. When I logged in first time, I created a default user as 'user'/'manav'/'manav2' (I tried \3 installations, each time using one of these users, but evrytime, the following problems occur)

Now the problems
1) As root, I did add few users thru
useradd -d /home/manav -n -p mypassword -g 700 manav

the gid 700 I had created before(-n for not creating a new group everytime)

When I log out of root and try to login as manav,it dioesnt accept me in, saying the password is wrong. I am only able to log in as root. I am not even able to login as 'users'/'manav'/'manav2' (the login which I created first tim at bootup.

few points
- /etc/passwd and /etc/group show correct entries for gid etc.
- I even tried removing the enable-md5 for password and the /etc/passwd shows the correct
- i tried to su - as manav from root. It does properly. however, when i do a passwd then, it asks for the passwd and doesnt accept mypassword.
- In gnome(as root), through 'System-setting" -> "users and groups", I tried to change the password for user manav. when I do an ok and reselect properties for manav, it shows 5 asterisks.
- /etc/nologin doesnt exist

It seems to me that maybe somehow my system is configured to login only as root. I've tried the installaiton 3 times and same thing happens.

Please help,

Question by:manav_mathur
    LVL 16

    Author Comment

    >- I even tried removing the enable-md5 for password and the /etc/passwd shows the correct

    shoud be
    - I even tried removing the enable-md5 for password and the /etc/passwd shows the correct password 'mypassword'

    LVL 17

    Expert Comment

    Have you tried to login as root and change the passwd for the user?" passwd manav". If that doesnt work you can try deleting manavs password - login as root and run passwd -d manav.
    LVL 40

    Assisted Solution

    Your problem is that you included "-p mypassword" in the user add command. The use of that option required that "mypassword" be the encrypted representation of the password, not the actual password.

    The fix is easy. First run authconfig and re-enable MD5 password encryption. Then execute (as root) 'passwd manav', enter the password twice when prompted. You'll then be able to log in a manav
    LVL 16

    Author Comment


    thanx for that. I even see it now in the man document. And it says using the crypt function for that.

    I am thinking

    1) useradd -d /home/manav -n -p crypt(mypassword,ae) -g 700 manav
    could do it??

    2)in Gnome, why does the password box in 'Users and setting' -> 'Properties' for a particular user always
    display 5 asterisk??

    does passwd -d manav create a new account with /etc/login.defs standard definitions.

    Anyways, I think I'll divide the points 75-70(jlevie:owensleftfoot), thats ok??

    Thnx again guys,

    LVL 17

    Accepted Solution

    Passwd -d deletes a users password - it enables them to login without any password at all.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    Suggested Solutions

    Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
    It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now