Sponsored Content
Top Forums UNIX for Dummies Questions & Answers editing a profile on solaris 2.3 Post 5175 by PxT on Wednesday 8th of August 2001 10:59:40 AM
Old 08-08-2001
Agreed. root should never have . in their path. Probably ok for normal users, as long as it is at the end of the path statement, not the beginning.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies

2. Solaris

Solaris 9 and .profile

I have created a custom nologin shell named nologinksh that looks like this. #!/bin/ksh DATE=`date |sed 's/:.. .*//'` LAST=`last -1 |grep "$LOGNAME.*$DATE"` if ; then echo "Remote logon is not permitted." else export SHELL=/bin/ksh . $HOME/.profile ... (0 Replies)
Discussion started by: woodson2
0 Replies

3. UNIX for Dummies Questions & Answers

Where is the .profile on Solaris 10G

Hi, I am trying to modifying the root user .profile file, but I cannot find it. If I do the command "echo $SHELL", i get /sbin/sh Where is the .profile located at? Sun's doc says the users home folder. I'm logged in as root, but when I go "/home", I don't see it :( Please help (9 Replies)
Discussion started by: annointed3
9 Replies

4. Solaris

rootsh on Solaris 10 is not sourcing root's .profile

I'm attempting to setup rootsh on Solaris 10 to log the activity of users who require root access. However it does not appear to be sourcing root's .profile file even when run with the '-i' option. I was wondering if anybody else has run into this and might have a solution. Thank you. (9 Replies)
Discussion started by: kungfusnwbrdr
9 Replies

5. Shell Programming and Scripting

Need help in setting .profile , .cshrc , .exerc ..... in HP-UX , Solaris , AIX-UX

I need help in settings to Hp-UX , Solaris , AIX-UX .. I worked on Linux previously ... now i am working on Hp-UX , Solaris , AIX-UX .. up/down arrow , to see history of previous command (basically to modify ) and few keyboard keys are different ... so i need to set .profile , .cshrc , ... to... (1 Reply)
Discussion started by: girija
1 Replies

6. Shell Programming and Scripting

Cron on Solaris not editing.

I am working on Solaris machine. I have to add a cron for some operation, nut in SSH terminal crontab -l shows all related crons, but crontab -e instead of opening vi editor shows some number. Could any body tell what can be issue? (16 Replies)
Discussion started by: nixhead
16 Replies

7. Solaris

Video capture and editing on Solaris vs Debian vs Ubuntu

I am interested in doing some heavy video work. I have a ADVC 110 Video capture device, which I am using to capture VHS video tapes, which I will convert on the server to DVD format and burn to DVD's using DVD production software. I will also take the captured video file and split it up in parts... (1 Reply)
Discussion started by: Marcus Aurelius
1 Replies

8. Solaris

How to give sudo entry in .profile file in Solaris?

Hi all, In Solaris , What entry should I add in my .profile file in home directory so that every time I don't have to give Sudo's full path like /usr/local/bin/sudo as well as /usr/sbin/ping and it will be Great help if you could tell me how to know what should be added. Please Advice.... (2 Replies)
Discussion started by: manalisharmabe
2 Replies

9. UNIX for Dummies Questions & Answers

.bash_profile versus .profile of user in Solaris 10

Hi All I am kind of confused, when to use .bash_profile or .profile I have just created a user on a test server, with: useradd -u 103 -d /fretagi -m -s /bin/bash fretagi but now in its home dir I have: -bash-3.2$ ls -al total 14 drwxr-xr-x 2 fretagi other 512 Dec 5 15:54 .... (5 Replies)
Discussion started by: fretagi
5 Replies
chroot(2)							   System Calls 							 chroot(2)

NAME
chroot, fchroot - change root directory SYNOPSIS
#include <unistd.h> int chroot(const char *path); int fchroot(int fildes); DESCRIPTION
The chroot() and fchroot() functions cause a directory to become the root directory, the starting point for path searches for path names beginning with / (slash). The user's working directory is unaffected by the chroot() and fchroot() functions. The path argument points to a path name naming a directory. The fildes argument to fchroot() is the open file descriptor of the directory which is to become the root. The privilege {PRIV_PROC_CHROOT} must be asserted in the effective set of the process to change the root directory. While it is always pos- sible to change to the system root using the fchroot() function, it is not guaranteed to succeed in any other case, even if fildes is valid in all respects. The ".." entry in the root directory is interpreted to mean the root directory itself. Therefore, ".." cannot be used to access files out- side the subtree rooted at the root directory. Instead, fchroot() can be used to reset the root to a directory that was opened before the root directory was changed. RETURN VALUES
Upon successful completion, 0 is returned. Otherwise, -1 is returned, the root directory remains unchanged, and errno is set to indicate the error. ERRORS
The chroot() function will fail if: EACCES Search permission is denied for a component of the path prefix of dirname, or search permission is denied for the directory referred to by dirname. EBADF The descriptor is not valid. EFAULT The path argument points to an illegal address. EINVAL The fchroot() function attempted to change to a directory the is not the system root and external circumstances do not allow this. EINTR A signal was caught during the execution of the chroot() function. EIO An I/O error occurred while reading from or writing to the file system. ELOOP Too many symbolic links were encountered in translating path. ENAMETOOLONG The length of the path argument exceeds PATH_MAX, or the length of a path component exceeds NAME_MAX while _POSIX_NO_TRUNC is in effect. ENOENT The named directory does not exist or is a null pathname. ENOLINK The path argument points to a remote machine and the link to that machine is no longer active. ENOTDIR Any component of the path name is not a directory. EPERM The {PRIV_PROC_CHROOT} privilege is not asserted in the effective set of the calling process. SEE ALSO
chroot(1M), chdir(2), privileges(5) WARNINGS
The only use of fchroot() that is appropriate is to change back to the system root. SunOS 5.10 20 Jan 2003 chroot(2)
All times are GMT -4. The time now is 07:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy