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.
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! ,
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).
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$
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
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.