- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: cd ~homedir not working
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2009 03:41 PM
11-02-2009 03:41 PM
cd ~homedir not working
For sometime now, I am unable to do -
cd ~homedir
but
cd /homedir works...
Can you suggest some pointers as to how I can troubleshoot or fix this?
Thanks,
Allan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2009 03:47 PM
11-02-2009 03:47 PM
Re: cd ~homedir not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2009 04:00 PM
11-02-2009 04:00 PM
Re: cd ~homedir not working
If you want "/homedir", then say "/homedir".
The "~user_name" notation is used with a user
name. That path to that user's home
directory is obtained from the "passwd" data
base ("/etc/passwd", or wherever). Unless
there's a user name of "homedir", "~homedir"
makes no sense.
What is the user name here?
Where is that user's home directory?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2009 04:05 PM
11-02-2009 04:05 PM
Re: cd ~homedir not working
Also sudo bash is very slow to respond...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2009 07:50 PM
11-02-2009 07:50 PM
Re: cd ~homedir not working
> cd /user-home-dir works.
So, does that mean that you're happy, or is
there still a problem/question there?
> Also sudo bash is very slow to respond...
A different thread with "sudo" in the Subject
might get more attention from people who know
more about sudo than I.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2009 10:10 PM
11-02-2009 10:10 PM
Re: cd ~homedir not working
Did you check which is the homedir set for your user?
getent passwd
Next to last field is homedir.
Regards,
Goran
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2009 03:48 AM
11-03-2009 03:48 AM
Re: cd ~homedir not working
if your user id existe and it has home dir.
have you seen some other problem or some specific thing when you not able to do this.
BR,
Kapil+
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-03-2009 04:39 AM
11-03-2009 04:39 AM
Re: cd ~homedir not working
If the user "foo" has his home directory set as /home/bar, the command "cd ~foo" moves to /home/bar.
Since you say your "cd /homedir" works, it is probably not a home directory permission problem.
Maybe the user cannot look up the home directory location for some reason?
What are the permissions of /, /etc and /etc/passwd?
Please run:
ls -ld / /etc /etc/passwd
The response should be something like this. Note the permissions:
drwxr-xr-x 25 root root 4096 2009-10-20 13:30 /
drwxr-xr-x 162 root root 16384 2009-11-03 12:57 /etc
-rw-r--r-- 1 root root 1854 2009-10-06 15:18 /etc/passwd
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2009 12:48 AM
11-05-2009 12:48 AM
Re: cd ~homedir not working
if you want to do 'cd ~otheruserhomedir', i'm not aware this is possible. afaik ~ always points to your own home dir and thus you should address others home dirs always as a full path.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-05-2009 07:13 AM
11-05-2009 07:13 AM
Re: cd ~homedir not working
> because [...]
For a valid explanation of what this means,
see Matti Kurkela's response.
> [...] i'm not aware [...]
Try it?
debi# cd ~
debi# pwd
/root
debi# cd ~ftp
debi# pwd
/home/ftp
debi# grep '^ftp:' /etc/passwd
ftp:x:110:65534::/home/ftp:/bin/false
Or read about it. "man
provide the details.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2009 12:20 AM
11-06-2009 12:20 AM