Unix/Linux Go Back    


Solaris 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

Solaris


Tags
solaris10 current directory root

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 04-24-2018   -   Original Discussion by egyassun
egyassun's Unix or Linux Image
egyassun egyassun is offline
Registered User
 
Join Date: Apr 2018
Last Activity: 14 June 2018, 11:43 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #2  
Old Unix and Linux 04-24-2018   -   Original Discussion by egyassun
Don Cragun's Unix or Linux Image
Don Cragun Don Cragun is offline Forum Staff  
Administrator
 
Join Date: Jul 2012
Last Activity: 22 June 2018, 6:54 AM EDT
Location: San Jose, CA, USA
Posts: 11,328
Thanks: 640
Thanked 3,945 Times in 3,372 Posts
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

Sponsored Links
    #3  
Old Unix and Linux 1 Week Ago   -   Original Discussion by egyassun
egyassun's Unix or Linux Image
egyassun egyassun is offline
Registered User
 
Join Date: Apr 2018
Last Activity: 14 June 2018, 11:43 AM EDT
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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
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



All times are GMT -4. The time now is 10:56 AM.