Sponsored Content
Full Discussion: user with limited privileges
Operating Systems Solaris user with limited privileges Post 302175974 by cmr164 on Monday 17th of March 2008 03:02:09 AM
Old 03-17-2008
Restricted Shell

Quote:
Originally Posted by Juha
Hi,
Is it possible to create a user that would have access only to a defined list of files? I would like to create a user that can access a set of files that are located behind different path. This user should not have access to anything else than these files.
OS is Solaris 10.
Thanks!
You might try having the user login shell set to /usr/lib/rsh. This will restrict him to his home directory and limit his $PATH to whatever you set it to be.

From the Docs
Assigning a Restricted Shell

The standard shell allows a user to open files, execute commands, and so on. The restricted shell is invoked with the /usr/lib/rsh command. The restricted shell can be used to limit the ability of a user to change directories and to execute commands. Note that the restricted shell is not the remote shell, which is /usr/sbin/rsh. The restricted shell differs from the standard shell in the following ways:

*

The user is limited to the user's home directory, so the user cannot use the cd command to change directories. Therefore, the user cannot browse system files.
*

The user cannot change the PATH variable, so the user can use only commands in the PATH set by the system administrator. The user also cannot execute commands or scripts by using a complete path name.
*

The user cannot redirect output with > or >>.

The restricted shell enables you to limit a user's ability to stray into the system files. The shell creates a limited environment for a user who needs to perform specific tasks. The restricted shell is not completely secure, however, and is only intended to keep unskilled users from inadvertently doing damage.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

User Privileges

I have used several Linux Flavors and now I need to know something. I have the ROOT user and then I have my personal user. What I need to do is for my normal user to be able to write files to directories where appearntly, only the root user has privileges. For example, to write files to... (1 Reply)
Discussion started by: gdboling
1 Replies

2. UNIX for Advanced & Expert Users

new user - basic privileges

I want to create a new user with very basic priviliges. How to jail the user in his home directory?? how to deny him some of unix commands (rm for example) thx (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

3. UNIX for Dummies Questions & Answers

create user - limited priviledge

i want to create unix user account (usera) for outsider so that they can run program that exist in /application/xxx/. The account have their own home directory (/home/usera). But on the same time the user cannot run any application/command either than in /application/xxx/. User can only... (1 Reply)
Discussion started by: golden_shooter
1 Replies

4. UNIX for Advanced & Expert Users

create user - limited priviledge

i want to create unix user account (usera) for outsider so that they can run program that exist in /application/xxx/. The account have their own home directory (/home/usera). But on the same time the user cannot run any application/command either than in /application/xxx/. User can only... (1 Reply)
Discussion started by: golden_shooter
1 Replies

5. AIX

Privileges User ((Please urgent))

Hi ,,, I create new user on AIX 5.2 but the user have privileges root user Why the user have privileges root user although the user specification not the same specification root user ??? PLease help me ... (6 Replies)
Discussion started by: AIX122
6 Replies

6. UNIX for Dummies Questions & Answers

user with limited access

dear guys, sorry for asking a noob :p question, tried to search the forum for an answer but couldn't find one, i am running solaris 10 and i would like to create a user with limited access to view only one directory, the directory already exist, is this possible:confused:? thanks and regards (4 Replies)
Discussion started by: q8devilish
4 Replies

7. Solaris

User with limited access to one directory

is there a way to create a user and limit him to read,write and execute only in one direcotry. the directory is already exsist and it belongs to dba group. i would like to make this user can't even cd to another directory or even if he can he cant do anything in the other directories. if... (7 Replies)
Discussion started by: q8devilish
7 Replies

8. Ubuntu

Create New User with the same group nd privileges of the other user

Hi, Anyone can help me on how to duplicate privileges and group for useroradb01 to userrootdb01. I have currently using "useroradb01" and create a newly user "userrootdb01". I want both in the sames privileges and group. Please see the existing users list below; drwxr-xr-x 53 useroradb01... (0 Replies)
Discussion started by: fspalero
0 Replies

9. HP-UX

How to create a user in UNIX with some limited permissions?

As i know, Unix or Linux only manages 2 type of user: root user or normal user. All users with userID=0 will have all administration permissions like root user with the system. In my case, i want to create a new user in HP-UNIX environment with all root permissions only one exception that this... (5 Replies)
Discussion started by: hieucn1404
5 Replies

10. HP-UX

User with root privileges in hp ux

hi, i am new in hp ux and i must create a user with root privileges and so i disable ssh connection from root login. thanks.. (6 Replies)
Discussion started by: eliste
6 Replies
user_attr(4)                                                       File Formats                                                       user_attr(4)

NAME
user_attr - extended user attributes database SYNOPSIS
/etc/user_attr DESCRIPTION
/etc/user_attr is a local source of extended attributes associated with users and roles. user_attr can be used with other user attribute sources, including the LDAP people container, the user_attr NIS map, and the user_attr NIS+ table. Programs use the getuserattr(3SECDB) routines to gain access to this information. The search order for multiple user_attr sources is specified in the /etc/nsswitch.conf file, as described in the nsswitch.conf(4) man page. The search order follows that for passwd(4). Each entry in the user_attr databases consists of a single line with five fields separated by colons (:). Line continuations using the backslash () character are permitted. Each entry has the form: user:qualifier:res1:res2:attr user The name of the user as specified in the passwd(4) database. qualifier Reserved for future use. res1 Reserved for future use. res2 Reserved for future use. attr An optional list of semicolon-separated (;) key-value pairs that describe the security attributes to apply to the object upon execu- tion. Zero or more keys may be specified. The following keys are currently interpreted by the system: auths Specifies a comma-separated list of authorization names chosen from those names defined in the auth_attr(4) database. Authorization names may be specified using the asterisk (*) character as a wildcard. For example, solaris.printer.* means all of Sun's printer authorizations. profiles Contains an ordered, comma-separated list of profile names chosen from prof_attr(4). Profiles are enforced by the profile shells, pfcsh, pfksh, and pfsh. See pfsh(1). A default profile is assigned in /etc/security/policy.conf (see policy.conf(4)). If no pro- files are assigned, the profile shells do not allow the user to execute any commands. roles Can be assigned a comma-separated list of role names from the set of user accounts in this database whose type field indicates the account is a role. If the roles key value is not specified, the user is not permitted to assume any role. type Can be assigned one of these strings: normal, indicating that this account is for a normal user, one who logs in; or role, indicat- ing that this account is for a role. Roles can only be assumed by a normal user after the user has logged in. project Can be assigned a name of one project from the project(4) database to be used as a default project to place the user in at login time. For more information, see getdefaultproj(3PROJECT). defaultpriv The default set of privileges assigned to a user's inheritable set upon login. limitpriv The maximum set of privileges a user or any process started by the user, whether through su(1M) or any other means, can obtain. The system administrator must take extreme care when removing privileges from the limit set. Removing any basic privilege has the abil- ity of crippling all applications; removing any other privilege can cause many or all applications requiring privileges to malfunc- tion. See privileges(5) for a description of privileges. The command ppriv -l (see ppriv(1)) produces a list of all supported privileges. Note that you specify privileges as they are displayed by ppriv. In privileges(5), privileges are listed in the form PRIV_<privi- lege_name>. For example, the privilege file_chown, as you would specify it in user_attr, is listed in privileges(5) as PRIV_FILE_CHOWN. lock_after_retries Specifies whether an account is locked after the count of failed logins for a user equals or exceeds the allowed number of retries as defined by RETRIES in /etc/default/login. Possible values are yes or no. The default is no. Account locking is applicable only to local accounts. Except for the type key, the key=value fields in /etc/user_attr can be added using roleadd(1M) and useradd(1M). You can use rolemod(1M) and usermod(1M) to modify key=value fields in /etc/user_attr. Modification of the type key is restricted as described in rolemod and usermod. EXAMPLES
Example 1: Assigning a Profile to Root The following example entry assigns to root the All profile, which allows root to use all commands in the system, and also assigns two authorizations: root::::auths=solaris.*,solaris.grant;profiles=All;type=normal The solaris.* wildcard authorization shown above gives root all the solaris authorizations; and the solaris.grant authorization gives root the right to grant to others any solaris authorizations that root has. The combination of authorizations enables root to grant to others all the solaris authorizations. See auth_attr(4) for more about authorizations. FILES
/etc/nsswitch.conf See nsswitch.conf(4). /etc/user_attr Described here. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ SEE ALSO
auths(1), pfcsh(1), pfksh(1), pfsh(1), ppriv(1), profiles(1), roles(1), roleadd(1M), rolemod(1M), useradd(1M), usermod(1M), getdefault- proj(3PROJECT), getuserattr(3SECDB), auth_attr(4), exec_attr(4), nsswitch.conf(4), passwd(4), policy.conf(4), prof_attr(4), project(4), attributes(5), privileges(5) NOTES
When deciding which authorization source to use, if you are not using LDAP, keep in mind that NIS+ provides stronger authentication than NIS. The root user is usually defined in local databases for a number of reasons, including the fact that root needs to be able to log in and do system maintenance in single-user mode, before the network name service databases are available. For this reason, an entry should exist for root in the local user_attr file, and the precedence shown in the example nsswitch.conf(4) file entry under EXAMPLES is highly recommended. Because the list of legal keys is likely to expand, any code that parses this database must be written to ignore unknown key-value pairs without error. When any new keywords are created, the names should be prefixed with a unique string, such as the company's stock symbol, to avoid potential naming conflicts. In the attr field, escape the following symbols with a backslash () if you use them in any value: colon (:), semicolon (;), carriage return ( ), equals (=), or backslash (). SunOS 5.10 16 Mar 2004 user_attr(4)
All times are GMT -4. The time now is 02:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy