Computing.Net > Forums > Solaris > No directory! error with su command

No directory! error with su command

Reply to Message Icon

Original Message
Name: drice
Date: November 3, 2003 at 05:49:26 Pacific
Subject: No directory! error with su command
OS: Solaris 8
CPU/Ram: Sun Fire 280R 1 Go
Comment:

When issuing su - login (I have 5 logins on my server), except for root, I got the following error : "No Directory!"

But directories for users exist! And they got the good rights.
For example, my user maint :
cat /etc/passwd | grep maint
maint:x:102:0:Maintenance Arca-Network:/home/maint:/bin/bash

ls -al /home | grep maint
drwxrwxrwx 2 maint root 512 Nov 3 13:45 maint

su - maint
No directory!

Can someone help me to understand? Is it a problem regarding patches?
Thanks,
Drice from France

PS : on my others servers it works fine!!!


Report Offensive Message For Removal


Response Number 1
Name: Danny Larouche XL2
Date: November 6, 2003 at 06:45:34 Pacific
Reply: (edit)

su maint
or
su - maint

The second one is wrong


Report Offensive Follow Up For Removal

Response Number 2
Name: ftye
Date: November 12, 2003 at 17:13:48 Pacific
Reply: (edit)

Add the -m flag to your useradd command. i.e


useradd -d /home/maint -m maint

This tells the OS to create the home directory.


Report Offensive Follow Up For Removal

Response Number 3
Name: Denny Raab
Date: November 21, 2003 at 08:54:14 Pacific
Reply: (edit)

I had a similar problem once, but the message was "no shell". Anyway, in my experience, the permissions on the / directory was wrong. Only root could log in ... no one else and even root could not su to the id.

The permissions were drwx------ for /
I chenged it to:
drwxr-xr-x

This fixed it.

Your problem is a little different. YOu are getting "No Directory!". I would check the permissions on all the directories above the actual directories. If any of them have the permissions that cause my problem exist ... it could do just what you are experiencing.

Good Luck

Denny


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: No directory! error with su command

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software




Have you ever used OpenOffice?

Yes, as my main suite.
Yes, occationally.
Yes, but only once.
No, never.


View Results

Poll Finishes In 5 Days.
Discuss in The Lounge