Home Man
Search
Today's Posts
Register

The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

SunOS confusing root directory and user home directory

Tags
solaris, solaris10 current directory root

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 04-24-2018
SunOS confusing root directory and user home directory

Hello,

I've just started using a Solaris machine with SunOS 5.10.
After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init).

Code:
 MACH1!myuser(staff,----,noView)@../myuser [41] pwd
 /home/staff/myuser

But the weird thing is that if I run a ls command, it shows me that in fact, it´s at the root directory (!!!)

Code:
 MACH1!myuser(staff,----,noView)@../myuser [42] ls -l
 (Shows directories: 
 /etc
 /home
 /usr ...)

And if I go to a subdirectory, something stranger happens.
It assumes a false path.
Code:
 MACH1!myuser(staff,----,noView)@../myuser [43] cd etc
 MACH1!myuser(staff,----,noView)@../etc [44] pwd
 /home/staff/myuser/etc

If I try to call this false path, the shell naturally can't do it.

Code:
 MACH1!myuser(staff,----,noView)@../etc [45] cd /home/staff/myuser/etc
 /home/staff/myuser/etc: No such file or directory

But if I call my home path, it works as expected.
Code:
 MACH1!myuser(staff,----,noView)@../etc [46] cd /home/staff/myuser
 /home/staff/myuser
  
 MACH1!myuser(staff,----,noView)@../myuser [47] ls -l
 (shows files in my home directory)

Well, I'm not so experienced with Unix and I have no idea what can be wrong. I looked some files such as .profile, dtautologin, but couldn't find anything that seemed to be causing this problem.

Can anyone give me a idea of what´s wrong with the configuration of this machine ?

Last edited by rbatte1; 04-25-2018 at 09:53 AM.. Reason: Removed the font formatting and added CODE tags where appropriate
# 2  
Old 04-24-2018
What do you mean by "someone configured "myuser" as default user after init"? What did "someone" do to make this configuration change?

How did you log into the system?

What output do you get from the command line:
Code:
who am I;ps

# 3  
Old 06-13-2018
Hi Don,

I discovered my problem was due to a highly customized prompt with csh shell.

Code:
 
 set prompt="`uname -n | cut -f1 -d"." `\\!`whoami`($GROUP,$NCID,$VIEW)@../$cwd:t[\!] "

Anyway, I answer your questions.

Quote:
What do you mean by "someone configured "myuser" as default user after init"?
I am using two machines with Solaris. The other machine asks the user for credentials. But this machine does not.
And when it starts, it goes directly to myuser´s home directory. So I think "myuser" is the default user for this Solaris session.

Quote:
What did "someone" do to make this configuration change?
I don´t know who did it, if "someone" still works at this company (probably not), and which configuration file was edited.

Quote:
How did you log into the system?
As I said - without credentials.

Quote:
What output do you get from the command line:
Code:
who am I;ps

[CODE]
myuser pts/3 Jun 13 21:24 (unix: 0.0)
PID TTY TIME CMD
1324 pts/3 0:00 ps
845 pts/3 0:00 csh
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Trying to delete a user and home directory Stellaman1977 Shell Programming and Scripting 2 11-07-2017 01:49 PM
rename all file with blank in directory from home root , please help me giankan Shell Programming and Scripting 1 09-18-2012 12:08 PM
Restricting a user to their home directory and below jjj0923 UNIX for Dummies Questions & Answers 6 09-29-2011 05:28 PM
Home Directory for oracle user beayni33 Solaris 1 02-10-2011 01:06 PM
User's home directory jredx Red Hat 5 05-05-2010 09:10 AM
Restricting SFTP user to a defined directory and home directory sftpuser Solaris 1 10-16-2009 07:00 PM
running sshd server from home directory without root access sayeo Solaris 0 03-13-2008 04:53 PM
Specifying FTP user Home Directory annointed3 UNIX for Dummies Questions & Answers 0 04-05-2007 09:52 PM
user home directory problem BangYourWallnut UNIX for Dummies Questions & Answers 1 08-18-2005 05:59 PM
How can I forbid a user to go up his home directory MarcoW UNIX for Advanced & Expert Users 2 10-04-2001 10:14 AM


All times are GMT -4. The time now is 01:44 PM.

Unix & Linux Forums Content CopyrightŠ1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password