Sponsored Content
Operating Systems Solaris SunOS confusing root directory and user home directory Post 303016338 by egyassun on Tuesday 24th of April 2018 04:57:04 PM
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 10:53 AM.. Reason: Removed the font formatting and added CODE tags where appropriate
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

user home directory problem

The home directory for me on my system is on /home/kwon. It was created using "useradd kwon" When i go to change the home directory for a user doing a usermod -d /home/test when they log on it gives them messages saying to generate new ssh keys, and it does. It gives me a thing that says... (1 Reply)
Discussion started by: BangYourWallnut
1 Replies

2. Solaris

running sshd server from home directory without root access

Hi, I managed to install openssh from source on my home directory on a server I don't have root access to. I had problems with privilege separation because of permissions initially so I disabled it in sshd_config. But when I run sshd from where I installed it by doing ~/local/sbin/sshd, nothing at... (0 Replies)
Discussion started by: sayeo
0 Replies

3. Shell Programming and Scripting

how to find out the home directory of a user??

Hi all, I would like to know how to find out the home directory of a particular user.. eg, If am the root , then my Home directory will be / if say am just a user logging into the terminal then my home dir would change, so accordingly i would like to know how to find it out... I know that... (7 Replies)
Discussion started by: wrapster
7 Replies

4. Solaris

Restricting SFTP user to a defined directory and home directory

Hi, I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP. The aim is to... (1 Reply)
Discussion started by: sftpuser
1 Replies

5. Red Hat

User's home directory

Hi, By default user's home directory will be /home/$user. I want to change it to /javauser/$user. How can I do it? Thanks Jeevan. (5 Replies)
Discussion started by: jredx
5 Replies

6. Solaris

Home Directory for oracle user

Hello all, I am Installing Oracle 11g on my Solaris OS. I created the below oracle user: # /usr/sbin/useradd -g oinstall -G dba oracle but when i am trying to to su - oracle it give me the below error No directory Do i have to setup a home directory for oracle user? and how can i do... (1 Reply)
Discussion started by: beayni33
1 Replies

7. UNIX for Dummies Questions & Answers

Restricting a user to their home directory and below

I found this old closed thread: I can do these things, but how to I change someone's profile - where do I find the profile? I'm running Centos 5.6 ~~~~~~~~~ providing you have the password shell set to ksh, you can put this in his .profile: cd /opt/load alias -x cd=: (6 Replies)
Discussion started by: jjj0923
6 Replies

8. UNIX for Dummies Questions & Answers

User's home directory not being created

I am trying to create Oracle user. I will install oracle after that. But my problem is /home/oracle directory is not being created. bash-3.2# useradd -g oinstall -G dba,oper -d /home/oracle -m oracle cp: /home/oracle: Operation not applicable chown: /home/oracle: No such file or directory ... (3 Replies)
Discussion started by: hubatuwang
3 Replies

9. Shell Programming and Scripting

rename all file with blank in directory from home root , please help me

hi , :wall: I've in directory home user 3 file with blank space in name file, I would like erase the all character that no have alphanum more dot in namefile from home root , below the script. If I execute the shell script from directory where stay it's execute well done.But I would like... (1 Reply)
Discussion started by: giankan
1 Replies

10. Shell Programming and Scripting

Trying to delete a user and home directory

Good Afternoon, I'm trying userdel -r username on Solaris 9 and getting UX: userdel: ERROR: unable to find status about home directory: No such file or directory I see the user's home directory and getent passwd shows the user Anybody know what's causing it? (2 Replies)
Discussion started by: Stellaman1977
2 Replies
pwd(1T) 						       Tcl Built-In Commands							   pwd(1T)

__________________________________________________________________________________________________________________________________________________

NAME
pwd - Return the absolute path of the current working directory SYNOPSIS
pwd _________________________________________________________________ DESCRIPTION
Returns the absolute path name of the current working directory. EXAMPLE
Sometimes it is useful to change to a known directory when running some external command using exec, but it is important to keep the appli- cation usually running in the directory that it was started in (unless the user specifies otherwise) since that minimises user confusion. The way to do this is to save the current directory while the external command is being run: set tarFile [file normalize somefile.tar] set savedDir [pwd] cd /tmp exec tar -xf $tarFile cd $savedDir SEE ALSO
file(1T), cd(1T), glob(1T), filename(1T) KEYWORDS
working directory ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWTcl | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for Tcl is available on http://opensolaris.org. Tcl pwd(1T)
All times are GMT -4. The time now is 07:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy