LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-19-2003, 06:44 AM   #1
suqu
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Rep: Reputation: 0
Unhappy redhat 7.1 - problem creating new users


I am using redhat 7.1 and am having problems creating usernames and passwords that work! I don't actually think CREATING new users is the problem - I am logged on as root and have easily managed to create new usernames that appear in the list of users (in control panel). However, when I try to log on using any of the new usernames/passwords the screen clicks and blinks twice and brings up the login window again. The passwords don't seem to be rejected (I don't get an 'authentification failed' message). Any ideas?
 
Old 08-19-2003, 08:23 AM   #2
Medievalist
Member
 
Registered: Aug 2003
Distribution: Dead Rat
Posts: 178

Rep: Reputation: 38
Use /usr/bin/passwd to set an initial password on the accounts you're created. They are probably being disallowed by your PAM configuration for not having passwords, or are being created disabled by the tool you are using to make them.

What are you using to create the accounts (useradd, vipw, some GUI tool?) and what do the users' lines in /etc/passwd and /etc/shadow look like after you've create them?
 
Old 08-19-2003, 09:20 AM   #3
suqu
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
I used 'Kontrol Panel' (GUI) to add the new users. They look as follows ...
/etc/shadow Xm52VUGXDyk6.:12283:0::7:::0
/etc/passwd x:1001:1001:user:/home/user:/bin/bash (where user is the username I created)
 
Old 08-19-2003, 10:17 AM   #4
Medievalist
Member
 
Registered: Aug 2003
Distribution: Dead Rat
Posts: 178

Rep: Reputation: 38
I'm going to assume you purposely chopped the first field (user name) off each of those lines for security reasons. If not, that's your problem!

The password you are showing in /etc/shadow is not an MD5 encryption string. Perhaps you hand-mangled it, also for security reasons... I sure wouldn't post my real password hash on a message board (I'd create a valid one, though, with a password I then would never use).

Red Hat is usually set up to use MD5 encryption and shadow passwords. These are good choices incidentally.

Make a terminal window, become root with the command su -, and execute the command "passwd user" where user is the userid giving you trouble. You'll need to type the password twice, as usual, but since you will be root you won't have to type in the previous password. This will fix any problems with the encryption or with the expiration flag fields in /etc/shadow.

If that doesn't work, post again, and we'll see if we can chase down some log messages in /var/log/secure or in the xwindows log file (harder to find).
 
Old 08-21-2003, 09:42 AM   #5
suqu
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Yes, I did leave the usernames off in my last post - I should have written

/etc/passwd user:x:1001:1001:user:/home/user:/bin/bash (where user is the username I created)

and similarly for /etc/shadow

As for the password hash, I thought I HAD created a valid password ...

I tried everything else you suggested without any success.
 
Old 08-21-2003, 11:45 AM   #6
Medievalist
Member
 
Registered: Aug 2003
Distribution: Dead Rat
Posts: 178

Rep: Reputation: 38
OK, this is a tricky one then...

Look at the file /var/log/secure and see if there are any diagnostic messages generated by the failed logins. Sometimes PAM will tell you exactly what's wrong in there.

This box is set up to run Xwindows at boot, right? If you change the line in /etc/inittab that looks like this -

id:5:initdefault:

to look like this:

id:3:initdefault:

you won't start X automatically (you can still switch to Xwindows with the command "startx" after you log in, though). Once you've modified inittab and rebooted, do the user accounts work in non-graphical mode?

Another approach is to use Red Hat's authconfig tool to make sure your authentication settings are consistent. That's kind of a shotgun approach, though, and won't really tell us what's wrong even if it fixes the bug.
 
Old 08-29-2003, 07:44 AM   #7
suqu
LQ Newbie
 
Registered: Aug 2003
Posts: 9

Original Poster
Rep: Reputation: 0
Talking

I've solved the problem - much simpler than we thought. It turns out that root didn't have access to the home directory - we couldn't create new users because home directories weren't being created. I changed the permissions on the home directory using the chmod command (I've been talking to a friend in computing, I'm a chemist!)

The command ls -l shows the PERMISSIONS for all files / directories in whatever directory you're in e.g drwxr-xr-x
The first character shows whether it is a file (-) or a directory (d) r,w and x mean read, write and execute
Characters 2-4 refer to the permissions of the current user, 5-7 to the group and 8-10 to anyone else

The permissions can be changed using chmod nnn filename (as root) where n are numbers
The first n refers to the user, the second to the group and the third to others. Each n is the total of the following:

r = 4, w = 2, x = 1, - = 0

and will vary depending on the degree of access you want to have

e.g chmod 777 filename means rwxrwxrwx

A TERRIBLE explanation, but it solved my problem ...

If anyone wants more info, post here and I'll reply

(THANKS FOR ALL YOUR HELP MEDIEVALIST)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem creating samba users pjbgravely Slackware 3 11-21-2005 06:51 AM
problem in creating users skvasistha SUSE / openSUSE 2 11-27-2004 08:08 AM
Problem Creating Archive With Tar In Redhat!!! hamidrh Linux - Newbie 4 09-16-2004 12:37 PM
Problem creating bootable CD for Redhat 9 indiacharm Linux - Software 2 10-15-2003 09:09 AM
Problem while creating MENU ITEM in RedHat 8 KDE and GNOME rameshvl Linux - General 1 04-25-2003 10:06 PM


All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration