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.
The account has a home directory with perms 755.
Blue
If I wasn't Blue, I would just be a Dragon...
RE: su - gives No Directory Error
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
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] Dragon](https://www.tipmaster.com/images/Dragon.gif)
If I wasn't Blue, I would just be a Dragon...
RE: su - gives No Directory Error
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
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] Dragon](https://www.tipmaster.com/images/Dragon.gif)
If I wasn't Blue, I would just be a Dragon...
RE: su - gives No Directory Error
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
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] Dragon](https://www.tipmaster.com/images/Dragon.gif)
If I wasn't Blue, I would just be a Dragon...
RE: su - gives No Directory Error
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
I thought they were all 755, but overlooked that one.
Thanks again.
Blue![[Dragon] Dragon](https://www.tipmaster.com/images/Dragon.gif)
If I wasn't Blue, I would just be a Dragon...
RE: su - gives No Directory Error
because login through su will give access to home directory and logn throuh su - , will give access to rot directory