Restriction to User


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory Restriction to User
# 1  
Old 05-18-2004
Restriction to User

Dear all,
I am trying to create a new user account that can have the minimum access to the HP-Ux box, as in it only need to perform system info query like bdf and only able to read access system log files but not able to delete any file from any other directory beside it's own user directory "/users/misgrp/misopr"
I have created it thru SAM to get the following into /etc/passwd
Any expert here can advise me on any other restriction that I can add in inorder to retrict this user further. As I tried deleted a file with this user account, it's able to despite that the file is read-only mode.

"misopr:,..:2502:202:MIS operations,,,:/users/misgrp/misopr:/usr/bin/sh"
# 2  
Old 05-18-2004
You could change the user's shell to a restricted ksh (rksh). Read the man page. It allows you to limit the user's PATH and what commands (or scripts) the user is allowed to execute.

You can also use extended ACL(s) to control file access, but not allow the user to own the files. Look at the man pages for setfacl.

Cheers,

Keith
# 3  
Old 05-21-2004
Depending on the level of security required (and your coding capability), you could write a menu driven shell script, or even a small C program, with only a small subset of functions defined (display log, show bdf output, etc, etc) and restrict the users abilities that way. Then, set the users shell to point to this file in /etc/passwd (first, add it into /etc/shells) e.g.

mruser:x:100:100:Mr User:/home/dir:/path/to/program

You must be careful that no backdoor exists with such a method, however (i,e, make sure that crashing the script with ^C doesn't drop the user into a shell, etc).

Just an idea,
Peace,
ZB
# 4  
Old 05-21-2004
I like zazzybob's menu idea. I'd probably steer clear of scripts and use a curses/C program; easier to close off functionality you don't want to allow. It doesn't have to be too complex, just a wrapper.

Cheers,

Keith
# 5  
Old 05-21-2004
I found this
http://www.linux-magazine.com/Magazi...oads/40/Shell/
it is for a basic menu-driven shell for various multimedia purposes, but could *very* easily be adapted for other uses.

As Keith indicates, Curses could be used to improve the UI.

cheers
ZB
# 6  
Old 09-10-2004
Hi All

I was reading this post and in particular jazzybob's comments about modifying the /etc/passwd in which the shell specified is replaced by the path of the program to be executed.
But I fail to find the /etc/shells file.

I have tried the steps mentioned by jazzybob but when the new user logs in it says "no shell"
I am trying to restrict a user to a only a shell script which he/she can execute.

Any Ideas on where am I going wrong??
I am on a Solaris Box.

Cheers!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Sudo -s restriction

Is there a way to stop users envoking a root shell with sudo on Solaris 10. I want users to use sudo <cmd> but not sudo -s (5 Replies)
Discussion started by: u20sr
5 Replies

2. AIX

User restriction on C/C++ compiler on AIX

Hello, I am curious that is there a way I can restrict a user or a set of users to execute the C/C++ compiler, basically what I want is to lock it down to a particular user and none of the other users should be able to compile any code. Thanks in advance. (14 Replies)
Discussion started by: m6248m
14 Replies

3. Linux

SFTP user access restriction to his home dir

Hi Friends, I have installed a FTP Server on my Linux machine (Fedora 11). I want the ftp users to be restricted to their own home dir using sftp. But the said condition is met when the user logs in using ftp over port 21 and when the user logs in using sftp i.e. protocol 22, he/she has... (4 Replies)
Discussion started by: pashy
4 Replies

4. UNIX for Dummies Questions & Answers

Create a new user with restriction

Hello, I would to create a new user with some restriction: 1. The user will not be able to CD any directory (I mean he'll login to the defined home directory and that's all). 2. The user will not be able to delete anything in that home directory Thanks a lot in advance, Shahar (1 Reply)
Discussion started by: shaharoz
1 Replies

5. AIX

Print queue restriction

Hi, I'm at AIX 5.3, I have a print queue named chqprinter, I want to allow access to print only 2 users to that print queue, jobs printed by all other users to above queue should be deleted. Any idea how to achieve that? ---------- Post updated at 10:33 AM ---------- Previous update was at... (5 Replies)
Discussion started by: tayyabq8
5 Replies

6. UNIX for Advanced & Expert Users

User restriction

Dear All I had one user called msc. In that i had two folder.xxx and yyy ex: /home/msc/xxx ex: /home/msc/yyy Now i want that msc user only able to access xxx folder only. No other folder should be visible to it. Kindly let me know. How it possile?? Regards Jaydeep (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

7. AIX

user session restriction

hi, I am facing a problem from the remote system if i login to my AIX5.3 machine as root (thru telnet) the session does not expire for 2 hours even if the session is kept ideal But whenever i do the same thing from some other user then the session is lost within 10 minutes (if session is kept... (2 Replies)
Discussion started by: pchangba
2 Replies

8. AIX

user session restriction

I want to restrict user's loging according to number of session. example the user named "patrik" can be login concurrently from 12 stations thru telnet the 13th if some body tries to telnet 13th session it should not allow, until any of the 12 sessions are closed. is it possibel ...i think... (2 Replies)
Discussion started by: pchangba1
2 Replies

9. Solaris

FTP Restriction

I have a senario and i wonder how to do it ? i used NcFTPd and i dont think its applicable using that application or i didnt know how to configure it. i want to have a user for FTP that user is only restricted to put and get from a certain directory and all sub-directories for that directory,... (0 Replies)
Discussion started by: mduweik
0 Replies

10. Shell Programming and Scripting

Restriction for more than one user

How do l restrict more than one users on a multiple programming environment using the c shell profile. That is if a user is log-on on one terminal the system should be able to prompt a message if the users attempt to log on on another terminal. I user openserver 5.0.4 with dummy terminals, and also... (7 Replies)
Discussion started by: kayode
7 Replies
Login or Register to Ask a Question