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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT REDHAT
cwd
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)