×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

su - gives No Directory Error

su - gives No Directory Error

su - gives No Directory Error

(OP)
I have an account that when I su to it works fine, but when I su - to it, I get a No Directory error.

The account has a home directory with perms 755.

Blue Dragon

If I wasn't Blue, I would just be a Dragon...

RE: su - gives No Directory Error

grep bba /etc/passwd

bba:x:104:104:Billy Bathgate:/home/bba:/usr/bin/ksh

Using "su - bba" will authticate and use "/home/bba" as the home directory.

You will need to make sure the directory exists and that an environment is setup by the "/home/bba/.profile" when you login.

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

36 years Bell, AT&T, Lucent, Avaya
Tier 3 for 26 years and counting
http://bshtele.com

RE: su - gives No Directory Error

(OP)
The correct directory is in the passwd file and the directory has the correct perms.  Their is no .profile file for this account.

When I run truss, it errors out at the following:

fcntl(4, F_DUPFD, 0x00000100)                   Err#22 EINVAL
read(4, " #   i d e n t\t " @ ( #".., 1024)     = 1024
read(4, " y   t h o s e\n # f u n".., 1024)     = 211
read(4, 0xFF342400, 1024)                       = 0
close(4)                                        = 0
getuid()                                        = 0 [0]
getuid()                                        = 0 [0]
door_info(3, 0xFFBFF688)                        = 0
door_call(3, 0xFFBFF730)                        = 0
setgroups(1, 0x000302A0)                        = 0
setuid(1002)                                    = 0
chdir("/var/NMS/tmp/s100")                      Err#13 EACCES [file_dac_search]
fstat64(2, 0xFFBFEEB8)                          = 0
su: write(2, " s u :  ", 4)                             = 4
No directory!write(2, " N o   d i r e c t o r y".., 13) = 13


The home dir is /var/NMS/tmp/s100
 

Blue Dragon

If I wasn't Blue, I would just be a Dragon...

RE: su - gives No Directory Error

show grep command for the login name on /etc/passwd
grep s100 /etc/passwd
show
ls -al /var/NMS/tmp/s100

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

36 years Bell, AT&T, Lucent, Avaya
Tier 3 for 26 years and counting
http://bshtele.com

RE: su - gives No Directory Error

(OP)
# grep s100 /etc/passwd
nwkdata:x:1002:1001::/var/NMS/tmp/s100:/bin/sh

# ls -al /var/NMS/tmp/s100
total 4
drwxr-xr-x   2 nwkdata  users        512 Jun  1  2007 .
drwxr-xr-x   5 nwkdata  users        512 Jun  1  2007 ..
 

Blue Dragon

If I wasn't Blue, I would just be a Dragon...

RE: su - gives No Directory Error

ls -l /var | grep NMS
ls -l /var/NMS | grep tmp
ls -l /var/NMS/tmp | grep s100

all of these must have permissions to allow nwkdata to cd to them
 

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

36 years Bell, AT&T, Lucent, Avaya
Tier 3 for 26 years and counting
http://bshtele.com

RE: su - gives No Directory Error

(OP)
# ls -l /var | grep NMS
drwxr-x---   3 root     root         512 Jun  1  2007 NMS

# ls -l /var/NMS | grep tmp
drwxr-xr-x   5 nwkdata  users        512 Jun  1  2007 tmp

# ls -l /var/NMS/tmp | grep s100
drwxr-xr-x   2 nwkdata  users        512 Jun  1  2007 s100
 

Blue Dragon

If I wasn't Blue, I would just be a Dragon...

RE: su - gives No Directory Error

chmod 755 /var/NMS should fix this
you will have to be root

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

36 years Bell, AT&T, Lucent, Avaya
Tier 3 for 26 years and counting
http://bshtele.com

RE: su - gives No Directory Error

(OP)
Thanks,

I thought they were all 755, but overlooked that one.

Thanks again.

Blue Dragon

If I wasn't Blue, I would just be a Dragon...

RE: su - gives No Directory Error

I think u dont have a root access dats why
because login through su will give access to home directory and logn throuh su - , will give access to rot directory

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close