Operating System - Tru64 Unix
1826499 Members
1567 Online
109692 Solutions
New Discussion

Not able to login with any user ID

 
Manish PATHAK_2
Regular Advisor

Not able to login with any user ID

Hi,

Whenever i am creating any user on the server teh user creation is successful,but when i issue the command "su - 'user' " it gives the error "no directory".

Kindly suggest what is missing in the configuration.

Regards
Manish
19 REPLIES 19
Michael Schulte zur Sur
Honored Contributor

Re: Not able to login with any user ID

Hi Manish,

please post
os version,
how do you create user?
entry of user in /etc/passwd
ls -la 'home directory of user'

thanks,

Michael
Venkatesh BL
Honored Contributor

Re: Not able to login with any user ID

Looks like the users home dir does not exist. As mentioned before, please check the 'passwd' entry.
Manish PATHAK_2
Regular Advisor

Re: Not able to login with any user ID

Hi Michael,

The OS Version is TRU64 5.1B

I am creating the user by the adduser command and following all the mandatory steps and yesterday i was able to login on the same user account but today i am not,may be some file or script is missing as it shows the error message "no directory"

the /etc/passwd format is..

test:KZINSvsVwbZHg:203:15:test:/usr/users/test:/bin/sh

Regards
Manish
Paul_504
Frequent Advisor

Re: Not able to login with any user ID

Manish, hi

I tried replicating the problem by deleting the user's home direcoty and then trying to su to the account. It gave the exact same error.

First see whether the test directory is still in /usr/users. If not, just recreate it using mkdir.

Try su'ing then. You don't need to first copy all the profile files. Just having the directory in place should work.

If you later want to copy the default profile files, you should be able to find them in /usr/skel.

Let us know the outcomes.

Regards
Paul
Johan Brusche
Honored Contributor

Re: Not able to login with any user ID

Manish,

HOW do you add your users ???
Do you vipw the passwd file( = BAD idea), or do you user useradd, adduser or dxaccounts.

If you had used adduser, and correctly answered all questions asked, then you would not have run into this issue....

Johan.

_JB_
Mobeen_1
Esteemed Contributor

Re: Not able to login with any user ID

Manish,
As the error implies its simply a fact that the users directory on your system for that user is not present.

I would suggest that you ls -l 'userdir' and make sure that the directory is present and then try the su...that should work.

How every, if you are able to su to the user today and cannot do it next day and still get the same error, then i would suggest that you look at some jobs that are running on your system. It might just be a case of some one or some job deleting the directory.

regards
Mobeen
Manish PATHAK_2
Regular Advisor

Re: Not able to login with any user ID

Hi,

The test directory exists.

User is added by using the adduser command and all the questions are answered carefully.

Everything is fine and till yesterday it was working fine,today it started giving the problem.The user directory exists but while giving the " su - test " command it is giving no directory find and the problem is same with all the users.even with the previous/existing one.

Manish
SlopeZ
Frequent Advisor

Re: Not able to login with any user ID

Hi Manish,

if anyone can login to their homes..
there is not a problem with the creation of test user.

Can you check the /usr/users directory permissions? If the user don't has permission to access home, then it's redirect to / and show that message.

Can the user loggin into / or the connection it's closed?

Regards.
Saints
Paul_504
Frequent Advisor

Re: Not able to login with any user ID

Hi Manish

SlopeZ has a point. Have a look at the permissions of the /usr/users directory as well as the permissions of each users home directory within /usr/users. Do a long listing in /usr as well as /usr/users in other words. All users should have execute permissions in the least on the /usr/users directory as well as their home directories.

Not having this also gives the No directory error.
Michael Schulte zur Sur
Honored Contributor

Re: Not able to login with any user ID

Hi,

please do
cd /usr/users/test
and post ls -lisa

thanks,

Michael
Manish PATHAK_2
Regular Advisor

Re: Not able to login with any user ID

# ls -lisa
total 30
35445 8 drwxr-x--x 3 test users 8192 Apr 26 10:38 .
35444 8 drwxr-xr-x 3 root users 8192 Apr 26 10:38 ..
35446 2 -rwxr-xr-x 1 test users 1295 Oct 17 2002 .cshrc
35448 2 -rwxr-xr-x 1 test users 1464 May 17 2004 .login
35450 2 -rwxr-xr-x 1 test users 1453 Oct 17 2002 .profile
35447 8 drwxr-xr-x 2 test users 8192 Jun 22 2004 bin
SlopeZ
Frequent Advisor

Re: Not able to login with any user ID

Michael,

i think if anyone can login, the wrong permission must to be in upper level:
/usr/
or
/usr/users

Manish, can you check this permission or post it here?

Thanks.

Saints.
Vijayasekar Rajsekar
Frequent Advisor

Re: Not able to login with any user ID

Manish,

Pls. do the following steps:

Before running through these steps, ensure that you can get a screen capture of all the commands that you will be executing, incase there are problems.

1. Remove the test user completely
2. Check if "/usr/users" directory is under one partition. Sometimes /users could be a softlink under /usr. This can be a problem sometimes.
3. Do a "adduser" command and add your user.
4. If command completes successfully, start
tracing your way upwards as "cd /usr, then cd users and then cd test.
5. Check '/etc/passwd' entry for your new user. What group are you using ?
6. Try logging in.
7. If you cannot login, pls. post the entire screen capture from steps 1-6 on this forum for further investigation.
Michael Schulte zur Sur
Honored Contributor

Re: Not able to login with any user ID

Manish,

ther are two things you still could do.
pwck
grpck
to check passwd and group file.

hth,

Michael
Venkatesh BL
Honored Contributor

Re: Not able to login with any user ID

Ok...I guess I know the reason for this problem.

From the o/p of ls -lisa, we see that:
# ls -lisa
total 30
35445 8 drwxr-x--x 3 test users 8192 Apr 26 10:38 .
35444 8 drwxr-xr-x 3 root users 8192 Apr 26 10:38 ..
35446 2 -rwxr-xr-x 1 test users 1295 Oct 17 2002 .cshrc

See that ".." is owned by 'root' (meaning 'test' directory is owned by root). Change ownership to 'test' using 'chown test test'. This should solve your problem.

Let us know if it does.
Manish PATHAK_2
Regular Advisor

Re: Not able to login with any user ID

Hi nw when creating the user getting the following error message....


cannot get directory path getwd:cann't lstat..

please suggest something as all the permissions andownerships are okie and all the home directories and files exists there.


May be something wrong with the getwd and lstat.

Regards
Manish
Manish PATHAK_2
Regular Advisor

Re: Not able to login with any user ID

Hi the problem has been resolved.

The root directory permissions were disturbed. Thanks a lot for all the help you people have provided.

Regards
Manish
Michael Schulte zur Sur
Honored Contributor

Re: Not able to login with any user ID

Hi,

would you please take a minute and award points to those who tried to help?

thanks,

Michael
read this
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
Manish PATHAK_2
Regular Advisor

Re: Not able to login with any user ID

after correcting the user directory permissions the problem has been resolved