Sponsored Content
Homework and Emergencies Emergency UNIX and Linux Support NIS created users without a home directory Post 302903449 by Junaid Subhani on Tuesday 27th of May 2014 04:57:08 PM
Old 05-27-2014
It just went crazy :/

Code:
[root@Barium home]# service autofs stop
Stopping automount:                                        [  OK  ]
[root@Barium home]# rm -rf /home
[root@Barium home]# service autofs start
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
chdir: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Starting automount:                                        [  OK  ]
[root@Barium home]# su - nisuser
su: warning: cannot change directory to /home/nisuser: No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
job-working-directory: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
-bash-4.1$

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Profiles for users without home directory

Hi I want to know which profile will be called when a user without home directory is created. When I created a user without home directory(by setting in /etc/default/useradd), the user is able to login directly into the main "/" folder but with only read permissions. Thanks naina (3 Replies)
Discussion started by: naina
3 Replies

2. UNIX for Dummies Questions & Answers

Home Directory Jail for Users

Hi, I am looking for a shell script (or any other way), that puts a user in a home directory jail. So for example, I have a user named richard and I don't want him wandering outside /usr/users/richard. I don't want him to cd to anywhere including cd .. Somebody said you can do that with... (3 Replies)
Discussion started by: mz043
3 Replies

3. UNIX for Advanced & Expert Users

Problem: Automounting Home directory for nis & nfs configuration doesn't work

Hi all, First of all, i am so sorry about my bad level in English writing. I have some problem in linux and i hope the experts of this forum to help me if they have enough time to reply to me. I have a scenario of configuring NIS and NFS in Redhat Linux environment such that user can login... (0 Replies)
Discussion started by: pioneer
0 Replies

4. UNIX for Dummies Questions & Answers

lost /home/directory for users

I'm using HPUX 11i. The other day a user logon to the workstation and was not able to find the /home/directory (tom is the directory) I login myself and it is the same thing. The home directory is on the server, so I was thinking of using sam to map it again. does anyone know how to do it... (5 Replies)
Discussion started by: blizzgamer
5 Replies

5. Solaris

Common Home directory for different users??

Hi Guys, I have a problem with configuring a server. this is a solaris 10 with sparc platform. I have setup so that the server is Authenticating through NIS but I dont want the server to Mount the Home directories. The users need to logged in through the CDE/display. I have over 200 users... (2 Replies)
Discussion started by: Luky
2 Replies

6. UNIX for Advanced & Expert Users

about the access permission of users home directory

RHEL5.0 As we know, when root create a new user, a new home directory will be created : /home/user I want to know what determine the access permission of /home/user . Thanks! (1 Reply)
Discussion started by: cqlouis
1 Replies

7. Red Hat

SSH lock users to the Home Directory

Hi friends, I must to give ssh connection to own customer. So I want to lock ssh user on own home directory. It is not necessery to reach other folders. I know that ftp user can lock on own folder but I don't know how to lock ssh user. I am waitting your kindly helps :D ---------- Post... (10 Replies)
Discussion started by: getrue
10 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. UNIX for Advanced & Expert Users

Permissions on a directory in /home for all users

Hi, I have created a shared directory on /home, where all users on a certain group have read, write and execute permissions. I did this using chmod -R g+rwx /home/shared/ The problem is, when a particular user creates a directory within /home/shared, other users are not able to write to... (8 Replies)
Discussion started by: lost.identity
8 Replies

10. HP-UX

How to set variable for users with no home directory?

Hi I need to set $HISTFILE for a user with no home directory. How to go about it because this user does not have a .profilefile. (5 Replies)
Discussion started by: fretagi
5 Replies
Cwd(3pm)						 Perl Programmers Reference Guide						  Cwd(3pm)

NAME
Cwd - get pathname of current working directory SYNOPSIS
use Cwd; my $dir = getcwd; use Cwd 'abs_path'; my $abs_path = abs_path($file); DESCRIPTION
This module provides functions for determining the pathname of the current working directory. It is recommended that getcwd (or another *cwd() function) be used in all code to ensure portability. By default, it exports the functions cwd(), getcwd(), fastcwd(), and fastgetcwd() into the caller's namespace. getcwd and friends Each of these functions are called without arguments and return the absolute path of the current working directory. getcwd my $cwd = getcwd(); Returns the current working directory. Re-implements the getcwd(3) (or getwd(3)) functions in Perl. Taint-safe. cwd my $cwd = cwd(); The cwd() is the most natural form for the current architecture. For most systems it is identical to `pwd` (but without the trailing line terminator). Taint-safe. fastcwd my $cwd = fastcwd(); A more dangerous version of getcwd(), but potentially faster. It might conceivably chdir() you out of a directory that it can't chdir() you back into. If fastcwd encounters a problem it will return undef but will probably leave you in a different directory. For a measure of extra security, if everything appears to have worked, the fastcwd() function will check that it leaves you in the same directory that it started in. If it has changed it will "die" with the message "Unstable directory path, current directory changed unexpectedly". That should never happen. fastgetcwd my $cwd = fastgetcwd(); The fastgetcwd() function is provided as a synonym for cwd(). abs_path and friends These functions are exported only on request. They each take a single argument and return the absolute pathname for it. abs_path my $abs_path = abs_path($file); Uses the same algorithm as getcwd(). Symbolic links and relative-path components ("." and "..") are resolved to return the canonical pathname, just like realpath(3). Taint-safe. realpath my $abs_path = realpath($file); A synonym for abs_path(). Taint-safe. fast_abs_path my $abs_path = fast_abs_path($file); A more dangerous, but potentially faster version of abs_path. This function is Not taint-safe : you can't use it in programs that work under taint mode. $ENV{PWD} If you ask to override your chdir() built-in function, use Cwd qw(chdir); then your PWD environment variable will be kept up to date. Note that it will only be kept up to date if all packages which use chdir import it from Cwd. NOTES
o Since the path seperators are different on some operating systems ('/' on Unix, ':' on MacPerl, etc...) we recommend you use the File::Spec modules wherever portability is a concern. o Actually, on Mac OS, the "getcwd()", "fastgetcwd()" and "fastcwd()" functions are all aliases for the "cwd()" function, which, on Mac OS, calls `pwd`. Likewise, the "abs_path()" function is an alias for "fast_abs_path()". SEE ALSO
File::chdir perl v5.8.0 2002-06-01 Cwd(3pm)
All times are GMT -4. The time now is 01:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy