Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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)
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).
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.