Blogs Classifieds Downloads FlashChat Gallery Googlemap Invite Friends Links Projects Reviews Wiki
 


Welcome to the pSeries Tech Forums, our free peer-based support site for administrators, engineers and architects working with IBM pSeries servers and software.

You are currently viewing our site as a guest which gives you limited access to view most discussions, articles, tutorials and access our other free features. By joining our community you will be able to collaborate with administrators, engineers and architects charged with designing, delivering or maintaining IBM pSeries server environments.

Founded by a recognized IBM pSeries consultant and IBM Redbook author, pSeries Tech Forums was developed with the single mission of bringing IBM pSeries professionals together into a single self-help community.

Registration is fast, simple and absolutely free to all IT professionals with responsibility for or interest in IBM pSeries servers. We invite you to join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

Our Sponsors
Want to advertise?  


Reply
 
LinkBack Thread Tools
  #1  
Old May 19th, 2008
adeel123's Avatar
adeel123 Offline
Member
 
Join Date: February 2008
Posts: 30
how to restrict user in his own directory

i just wanted to restrict my user in his own directory like he cant even look in /etc or any other file system . he can only view things and write them in his own directory. i have already tried sudo. can any 1 have any other idea fot this.

waiting fro the reply
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old May 19th, 2008
john.samons's Avatar
john.samons Offline
Meditating on the code...
 
Join Date: September 2007
Location: Johannesburg, South Africa
Posts: 95
Re: how to restrict user in his own directory

You can change his default shell (smitty user) to use a restricted shell.

Instead of /usr/bin/ksh
use : /usr/bin/rksh

Make sure you've listed this shell in /etc/security/login.cfg

Using this shell restricts the user significantly...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old May 19th, 2008
adeel123's Avatar
adeel123 Offline
Member
 
Join Date: February 2008
Posts: 30
Re: how to restrict user in his own directory

thanks john.

just wanted to confirm 2 more things how to put the entry in login.cfg if rsh is not ther . secondly if i want to allow user to some directory and also restrict him from some directory how can i do it. for example i want to allow him to access /etc /usr but i want to restrict him from /var etc . how can i do it.
thanks john.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old May 19th, 2008
john.samons's Avatar
john.samons Offline
Meditating on the code...
 
Join Date: September 2007
Location: Johannesburg, South Africa
Posts: 95
Re: how to restrict user in his own directory

On adding it to the list of valid shells, at the bottom, just add it to the end of the line that says... shells = ......., your new shell path

But be careful ..... rsh is actually....
The /usr/bin/rsh command executes the command specified by the Command
parameter at the remote host specified by the RemoteHost parameter

You need to use /usr/bin/rksh : Which invokes the restricted version of the Korn shell.

For refining rksh, check out the man page.... and ... IBM Systems Information Center

Depending on the level of security required (and your coding capability), you could also 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 the valid list of 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).

Maybe you don't even need all that. Will enforcing proper system security not resolve your problem?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old May 20th, 2008
adeel123's Avatar
adeel123 Offline
Member
 
Join Date: February 2008
Posts: 30
Re: how to restrict user in his own directory

dear John ,

thanks alot i have checked the rksh thing and user is restricted to his profile only.
but still i m unable to get that how can i restrict him from some diectories and allow him for some directories .

As i m new to AIX i dont know any scripting.


regards
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old May 20th, 2008
john.samons's Avatar
john.samons Offline
Meditating on the code...
 
Join Date: September 2007
Location: Johannesburg, South Africa
Posts: 95
Re: how to restrict user in his own directory

Well read up on configuring the rksh, there's a couple of tricks on allowing or restricting certain information, but what is it that they should and shouldn't be able to do?

It sounds like applying the correct permissions, user & groups to your structure might do the trick. Else you could also look at sudo.... it solves many problems...

If you want tight security. Create a user "pawn" and place him in his own group "outcasts", then give him the rksh shell. If he wants to view anything, let him give you a list or locations that is acceptable to you, and add them to sudo.... ALSO don't use vi in sudoers. As this is a security hole. Use tvi ... to just view, ...use 'more'.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

These are the 100 most searched terms
Search Cloud
0042-001 0042-001 nim 0513-001 the system resource controller daemon is not active 0513-001 the system resource controller daemon is not active. 0514-061 0514-061 cannot find a child device 0514-061 cannot find a child device. 0516-787 0516-787 extendlv 0516-787 extendlv: maximum allocation for logical volume 110000ac aa00e1f3 aio aix aix aio aix freeware aixif_arp_dup_addr b150f22a b181f22a b181fb53 ba010004 c1001020 d133c002 dacnone dcb47997 fcp_array_err6 fget_config gnu tar aix gsclvmd gtar aix hi yall hmc root password hmc vmware hscl05db ibm p6 ibm p6 520 libpopt aix libpopt.a libpopt.a(libpopt.so.0) is needed by rsync-2.6.2-1 migratelv mksysb navisphere agent nim server pseries pseriestech rsync aix sc_disk_err4 scan_error_chrp vio server websm xhost file ... powered by Simple Search Cloud


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Powered by vbWiki Pro 1.3 RC5. Copyright ©2006-2007, NuHit, LLC

vBulletin Skin developed by: vBStyles.com


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50