Sponsored Content
Special Forums UNIX Desktop Questions & Answers Restricted shell with execution permission on a file Post 302969060 by mary0 on Thursday 17th of March 2016 12:35:12 PM
Old 03-17-2016
Restricted shell with execution permission on a file

Hi,
I've created a user which shell is the restricted one (/usr/lib/rsh), but I've realized that the user cannot execute a script !!!
The scope was to allow the ssh access to a user that could not access to any other directories but there that user should be able to run a script that retrieves the data that the user needs and anything else.

Is there a way to modify the .profile in order to allow the user to run that script?

Hope someone can help me.

Thanks in advance.

---------- Post updated at 05:35 PM ---------- Previous update was at 05:17 PM ----------
P.S.: need to add that I didn't find either the profile files. I'm logged into as the new user, and I can't find the .profile .bash_profile .bash_logout files in its own directory (Sun OS server) ....

Thanks again

Last edited by mary0; 03-17-2016 at 01:54 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

SAM-Execution permission denied

Hi All, I have a problem at my HP box, at command line when i type sam to access sam, the message execution permission denied comes out, What do i do? Please help Thanks (2 Replies)
Discussion started by: joylili
2 Replies

2. Shell Programming and Scripting

How to create file execution in KSH shell

Dear all, I'm new in Unix system, I need help about how to create execution file. for example in my system i have file fg* when i open fg file i get : cmd='basename$0' $cmd "$@" how to create file like that (execution file) in KSH shell thank you for your help heru (4 Replies)
Discussion started by: heru_90
4 Replies

3. UNIX for Dummies Questions & Answers

Permission on files restricted to a process

Hello, I have this process app.fcgi and a directory containing images. I'd like to ensure that only app.cgi can access those images and more generally that folder.Thanks! (1 Reply)
Discussion started by: JCR
1 Replies

4. Shell Programming and Scripting

File permission setup including execution

Oracle uses 'dbadmin' user on UNIX and one of the oracle trigger creates a file. However, it doesn't provide 'Read' & 'Write' access to 'group' & 'other' users. Per security reasons, we shouldn't use 'umask' feature. We have been trying to use 'setfacl' commands to achieve the same, but couldn't... (2 Replies)
Discussion started by: MeganP
2 Replies

5. Shell Programming and Scripting

issue invoking shell script using cron, even with proper file permission

I am using tcsh what could possibly be a problem, when using crontab to invoke a shell script. ? The script has the read, write and execute permission to all users. And the script works as expected while executing it in stand-alone mode. Is there a way to trace (like log) what error... (9 Replies)
Discussion started by: vikram3.r
9 Replies

6. AIX

Restricted shell

Hello I have a user with a Restricted Shell on a Aix 5.3. My question is about if I can add one more path on the home directory. I mean the user have in his home directory. for example /test/my_application/logs but I need that this user can view another log that is on another path, if this... (1 Reply)
Discussion started by: lo-lp-kl
1 Replies

7. Shell Programming and Scripting

Execution Output of a shell script into a file.

Hi Experts, I have a script called test.sh. I am trying to execute it with sh -x test.sh. Where i can find sequence of steps executed one by one. Now i want to these executions to be captured in a file. i.e sh -x test.sh > output.txt the above one is notworking. can anyone help me... (6 Replies)
Discussion started by: naree
6 Replies

8. AIX

Execution permission denied

Hello everybody ! I'm trying to launch an application on a AIX server but I always have the error message : ksh: ./TalendOpenStudio-linux-gtk-ppc: 0403-006 Execute permission denied. while I have execution permission. I put on attached item what I have done. I have X11R6 as... (3 Replies)
Discussion started by: Bouga74
3 Replies

9. Shell Programming and Scripting

Restricted File Comparison

Hey guys, I've got a scripting problem that has been bugging me so thought I'd ask the wise people here! Basically I have two overlapping log files, and I want to get the newest lines from the new log file that aren't in the old log file - but not the old lines in the old log that aren't in the... (1 Reply)
Discussion started by: salamagd
1 Replies

10. Programming

Creating a bash based restricted shell

Hello. I need to write a command line interface that can be invoked either directly from the shell (command sub-command arguments), or as a shell that can process sub-commands. i want to use bash auto completion for both scenarios. example: lets say my CLI module is called 'mycli' and there... (5 Replies)
Discussion started by: noamr
5 Replies
rsh(1M) 						  System Administration Commands						   rsh(1M)

NAME
rsh, restricted_shell - restricted shell command interpreter SYNOPSIS
/usr/lib/rsh [-acefhiknprstuvx] [argument]... DESCRIPTION
rsh is a limiting version of the standard command interpreter sh, used to restrict logins to execution environments whose capabilities are more controlled than those of sh (see sh(1) for complete description and usage). When the shell is invoked, it scans the environment for the value of the environmental variable, SHELL. If it is found and rsh is the file name part of its value, the shell becomes a restricted shell. The actions of rsh are identical to those of sh, except that the following are disallowed: o changing directory (see cd(1)), o setting the value of $PATH, o pecifying path or command names containing /, o redirecting output (> and >>). The restrictions above are enforced after .profile is interpreted. A restricted shell can be invoked in one of the following ways: 1. rsh is the file name part of the last entry in the /etc/passwd file (see passwd(4)); 2. the environment variable SHELL exists and rsh is the file name part of its value; the environment variable SHELL needs to be set in the .login file; 3. the shell is invoked and rsh is the file name part of argument 0; 4. the shell is invoke with the -r option. When a command to be executed is found to be a shell procedure, rsh invokes sh to execute it. Thus, it is possible to provide to the end- user shell procedures that have access to the full power of the standard shell, while imposing a limited menu of commands; this scheme assumes that the end-user does not have write and execute permissions in the same directory. The net effect of these rules is that the writer of the .profile (see profile(4)) has complete control over user actions by performing guaranteed setup actions and leaving the user in an appropriate directory (probably not the login directory). The system administrator often sets up a directory of commands (that is, /usr/rbin) that can be safely invoked by a restricted shell. Some systems also provide a restricted editor, red. EXIT STATUS
Errors detected by the shell, such as syntax errors, cause the shell to return a non-zero exit status. If the shell is being used non- interactively execution of the shell file is abandoned. Otherwise, the shell returns the exit status of the last command executed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
intro(1), cd(1), login(1), rsh(1), sh(1), exec(2), passwd(4), profile(4), attributes(5) NOTES
The restricted shell, /usr/lib/rsh, should not be confused with the remote shell, /usr/bin/rsh, which is documented in rsh(1). SunOS 5.11 1 Nov 1993 rsh(1M)
All times are GMT -4. The time now is 03:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy