Sponsored Content
Operating Systems Solaris How to restrict rm -rf * to users other than root? Post 302680857 by Corona688 on Thursday 2nd of August 2012 11:17:06 AM
Old 08-02-2012
No, they don't, actually. Aliases apply to interactive logins, only interactive logins, and nothing but interactive logins.

If you type 'rm' directly into a root terminal where rm is aliased to rm -i, it will run 'rm -i'.

It does that absolutely nowhere else. Not inside scripts or utilities, even if you run them from that same terminal.

Which is a pretty good reason to use an alias for this, actually, and why you actually see that sort of thing done a lot.

Last edited by Corona688; 08-02-2012 at 12:24 PM..
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Restrict users to ther home directory

Hello! I want users in a certain group to be restricted to their home directory. So that they have full access to all files and folders in their home directory but the cant go to any directory above. Does anyone know how to do this? Anders (1 Reply)
Discussion started by: alfabetman
1 Replies

2. UNIX for Dummies Questions & Answers

Restrict users to certain functions

Hi Gurus, Tried searching for something similiar in this forum but not really what i want. This is my case: I have about 20 users running on sun workstation. We have done a upgrade recently and right now it seems that the users can access to terminal and console which they are not suppose... (12 Replies)
Discussion started by: lweegp
12 Replies

3. Solaris

how to restrict the perticular commands to users

Hi all, How to restrict the perticular commands to users(or perticular users) in solaris10? Could you please assist me the precedure for above issue. Thanks & Regards krishna (0 Replies)
Discussion started by: krishna176
0 Replies

4. Shell Programming and Scripting

how to restrict FTP users not to delete their files

Hello all, We have an FTP Server setup with VSFTPd and its working fine without anonymous login (we must maintain this standard) The requirement is to restrict users not to overwrite (and delete) their files. In other words, once their files are uploaded to FTP Server, they should not be... (1 Reply)
Discussion started by: prvnrk
1 Replies

5. UNIX for Advanced & Expert Users

Restrict access to specific users.

Hi All! I would like to know if there is any specific way by which I can restrict access to apecific users (ip addresses). OS : Red hat linux Thanks! nua7 (6 Replies)
Discussion started by: nua7
6 Replies

6. Red Hat

Restrict local users to access ftp

Hi, I had installed vsftp in rhel5 and i want to restrict all the local users from accessing the ftp. i want to allow specific users to access the ftp server. Request you to please help. Thanks & regards Arun (1 Reply)
Discussion started by: Arun.Kakarla
1 Replies

7. Linux

Restrict NFS access to root

Hi Everybody, If there is a general NFS share in the LAN and for example this share has three files - a, b, c is there any way to restrict file access to the root user of one particular host(falcon) in the same LAN environment while the normal users from the same host(falcon) should be able... (4 Replies)
Discussion started by: sudhirav
4 Replies

8. Solaris

To restrict the users not to change the passwords for NIS users

Hi All, How to restrict the NIS users not to change their passwords in for NIS users?? and my NIS user is unable to login to at client location what could be the problem for this ? Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies

9. Shell Programming and Scripting

How to restrict root user from running some commands

is it possible that we can restrict the root user if he runs some commands?? e.g i want if root runs command 'rm etc/passwd', he shoudn't be able to run command and throws error :confused: (3 Replies)
Discussion started by: sheelsadan
3 Replies

10. AIX

Procedure to restrict direct access as root

Hello, I would like to confirm whether the below procedure is correct. disabled direct super user access on AIX server using below procedure. Please let me know if there is any additional step. 1) confirm the access to HMC, console to reach the LPARs 2) chuser rlogin=false root ... (3 Replies)
Discussion started by: dio34
3 Replies
auth_for_terminal_es(3) 				     Library Functions Manual					   auth_for_terminal_es(3)

NAME
auth_for_terminal_es - determine whether a given user is authorized for login on a given terminal (Enhanced Security) LIBRARY
Security Library - libsecurity.so SYNOPSIS
#include <prot.h> int auth_for_terminal_es( struct es_passwd *prpwd, struct es_term *prtc); PARAMETERS
prpwd Specifies a pointer to the protected profile structure prtc Pointer to a terminal control structure DESCRIPTION
The auth_for_terminal_es() function determines whether the username associated with the prpwd parameter is authorized for logins on the terminal associated with the prtc parameter. The determination is based on the username (prpwd->uflg->fg_name and prpwd->ufld->fd_name), the terminal name (prtc->uflg->fg_devname, prtc->ufld->fd_devname), and the associated device assignment database entry (fields uflg->fg_users and ufld->fd_users). If either parameter is NULL or if either the username or terminal name is NULL, the function returns 1. If the device assignment entry corresponding to the given terminal is not found, a 1 is returned. If the device assignment entry has no list of authorized users, or if the username associated with the prpwd parameter is present in the list, then auth_for_terminal_es() routine returns 1. If there is a list of authorized users, but the associated username is not found in that list, this function returns 0. RETURN VALUES
A return of 1 indicates that the user is authorized for logins on the indicated terminal A return of 0 indicates that the user is not authorized for logins on the indicated terminal NOTES
In order to quickstart a program, the program must be linked as follows: -lsecurity -ldb -laud -lm See the shared library discussion in the Programmer's Guide for more information about using the quickstarting feature. The auth_for_terminal_es() function is called as part of login processing for enhanced security. RELATED INFORMATION
getespwent(3), getestcent(3), getesdvent(3) Security delim off auth_for_terminal_es(3)
All times are GMT -4. The time now is 06:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy