I can’t figure out which file controls the directory you are in once you login as root. I tried putting “cd /andy” into the sysinit.1 file, but that didn’t work. Where does this need to go? I didn’t have a .profile in the root directory, so I created one and put “cd /andy” as the last entry, but that didn’t work either. Help!
Guessing here, but maybe /etc/profile?
How do I do it though? I added “cd /andy” (without quotes) as the last line of /etc/profile and it didn’t work.
/etc/passwd defines everybody’s $HOME directory. $HOME directory is where you end up with after you login.
Ok, but how do I end up at /andy after login?
Are you asking how to achieve that? or explanations on why it is doing that to you?
post the output of “grep root /etc/passwd” and “grep andy /etc/profile”.
I’m asking how I achieve that.
[u]/etc/passwd[/u]
root:x:0:0::///:/bin/sh
[u]/etc/profile[/u]
cd /andy
Also, I’ve noticed that once I reboot, about 30 seconds or so after waiting at the login prompt, “No drives defined” will appear next to "login: ". Or, if I go ahead and login after reboot, it will still display “No drives defined” after about 30 seconds. In both instances I have to hit enter to get the prompt back, and then I can proceed as usual. Why is this happening?
Well, I think I fixed this problem. I didn’t have Fsys.eide & in my sysinit.1 file. I still need help with the original question though. Thanks.
I thought those had been discussed here:
openqnx.com/PNphpBB2-viewtopic-t2572-.html
to re-cap:
-
for root’s home dir, please edit /etc/passwd to change root:x:0:0::///:/bin/sh to root:x:0:0::/andy:/bin/sh
-
add some sleeps in sysinit.X file (before “tinit”).
Thanks again, noc!
Tell me something though, my work QNX box defaults to the /andy directory after login, but my /etc/passwd on that box reads: root:x:0:0::///:/bin/sh