LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Users other than root cannot login? (https://www.linuxquestions.org/questions/linux-newbie-8/users-other-than-root-cannot-login-70392/)

cyberswami 07-05-2003 09:32 PM

Users other than root cannot login?
 
Hi, i have a RH 7.3 box, recently i found that users other than the root cannot login into their shell accounts ,
what could be wrong ,
when they try to login, a message prompts that the home directory could not be found , therefore it is logging in with home directory ="/" and then a prompt with bash$ comes and i cannot run any command on the home directories since it states that permission denied,

one thing that i noticed was that when the message comes stating that home directory could not be found, there is a '!' mark at the end of the home-directory name,
like /home/user! ,

help me out

Tinkster 07-05-2003 10:15 PM

First thing would be to have a look
at /etc/passwd

Cheers,
Tink

cyberswami 07-06-2003 03:20 AM

i looked at the /etc/passwd file, it made no sense to me
i'm a newbie

MasterC 07-06-2003 03:29 AM

Go ahead and post it up if you'd like.

However, the line/entries you are probably going to want to look at will be the users entries, and the corresponding HOME that they have, such as /home/cyberswami for user cyberswami
And the shells, these should be:
/bin/bash
or other appropriate shells for your situation (most likely bash for now).

Cool

cyberswami 07-06-2003 04:31 AM

The /etc/passwd file shows no problem but i still get the following message :

Last login: Mon Jun 30 15:22:19 on tty4
No directory /home/cyberswami!
Logging in with home = "/".
bash: /home/student/.bash_profile: Permission denied
bash-2.05$

MasterC 07-06-2003 04:53 AM

It would really help us if you posted up your /etc/passwd file. However, I understand if you are a little paranoid, and wish to not do this.

/home/cyberswami
And
/home/student
Are not the same unless they are symlinked to each other (not likely). So either there is an issue with your /etc/passwd syntax (likely) or your permissions are really out of whack.

I'd go about this like so:

Remove the corresponding line ONLY from /etc/passwd, then, follow it up with an adduser -g blah -s /bin/blah (blah is the only word that comes to mind ;) ) and so on to create the new user, this may help with the syntax issue. Also, check permissions on /home/username (assuming that's what you set from your useradd/adduser script) to make sure that your user has ther permissions to access it.

To check permissions:
ls -l /home
And look for the directory that is assigned to the user as their home, likely the users name: /home/user

HTH

Cool

cyberswami 07-06-2003 04:59 AM

actually there's no problem with symlinks, i just got a bit paranoid,the home directory has got a 777 permission i just tried that out to check whether it will work or not
i still get the same problem

MasterC 07-06-2003 05:56 AM

If the home directory has 777, then ANYONE on your system should be able to access it, yet you are getting errors of "Permission Denied" on it. I'm leaning towards a syntax error in /etc/passwd, or, hopefully not (since I don't understand it all that well) an error in PAM or Shadow... Try removing the user and recreating them with useradd and see if that fixes the problems.

Cool

x2000koh 07-07-2003 08:21 PM

No directory /home!
 
Hi !
I have setup an NIS server and client. I have created user 'jane' at nis server.

At nis client, I login as jane and enter password. The following message appear.

node_B login:jane
password:
Last login:sat Nov 18 22:16:42 on tty1
No directory /home/jane!
Logging in with home="/"
bash-2.05 $


My /etc/passwd and /etc/group is as follow:

/etc/passwd
----------------
joe:x:501:502:joe tan:/home/joe:/bin/bash

/etc/group
-------------
student:x:501:jane, tom, joe

Appreciate if anyone can help. Why can I access the /home directory.

Regards,
x2000koh


All times are GMT -5. The time now is 08:09 AM.