The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
On ROWNUM and Limiting Results iBot Oracle Updates (RSS) 0 04-06-2008 02:10 AM
SSH keys and command limiting ... moomain UNIX for Dummies Questions & Answers 1 01-29-2008 04:50 PM
limiting failed logins to three csaunders HP-UX 1 10-18-2007 06:56 AM
Problem with limiting logins to one in AIX 5.3 Confused_lulu Security 2 05-01-2007 10:38 AM
Limiting telnet sessions on HP UX Box Witlr UNIX for Advanced & Expert Users 2 02-25-2002 03:43 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-23-2001
Registered User
 

Join Date: Feb 2001
Location: Israel
Posts: 3
Stumble this Post!
Unhappy

Hi, I'm new to linux and unix, and i have couple of problems:

1) how can i limit the access for a user, for example, i created a user, and i want that this user will be able to be only in one directory, and will see only the files i want him to.

2) I have a domain name, and i want that every time i type this domain name in the browser, it will be connected to my unix/linux server. (to connect a DNS with my own server)

10Q very much...
Forum Sponsor
  #2 (permalink)  
Old 02-23-2001
PxT's Avatar
PxT PxT is offline
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
Stumble this Post!
1) Since the 'cd' command is a shell builtin, you would have to write (or modify) your own shell to remove the ability to change directories with this command. An alternative might be to have his login script run a program which calls the chroot() system call. do a 'man chroot' for information.
I suggest finding a local Unix guru to help you.

2) Contact an ISP and pay them to put your DNS info in their servers, or look into using <A HREF="http://soa.granitecanyon.com/">The Public DNS Service</A>.
  #3 (permalink)  
Old 02-23-2001
Registered User
 

Join Date: Feb 2001
Location: Israel
Posts: 3
Stumble this Post!
Oh..ok, and another question,
if i did FTP from my ip, and i give someone username and password, how can i make his root directory to be something that's not root (for example his home directory)?
  #4 (permalink)  
Old 02-23-2001
Neo's Avatar
Neo Neo is offline
Administrator
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 4,288
Stumble this Post!
CHROOT

To do as you wish, you could use chroot in the /etc/password file in the last field (where the shell is). For example, to make the user have a root of /home/misha, then you would change the final field in /etc/password to be something like:

Code:
/usr/bin/chroot /usr/misha /bin/sh
In most implementations (and the GNU version) the shell does not have do be specified because without an argument the default shell is the command.

As PxT suggests, chroot is the approach. However, building a chroot environment can be tricky because commands that a user would normally have access to are not available unless explicitly under the new chroot directory. In other words, you must build a new environment under the new pseudo root file system and provide all commands.

This could be difficult for newbies, but it can be done I suggest reading the chroot manpage and supporting documents carefully.
  #5 (permalink)  
Old 02-24-2001
Registered User
 

Join Date: Feb 2001
Location: Israel
Posts: 3
Stumble this Post!
Angry

first of all, thank you for all your help,
second: I dont really got you, please tell me step by step how to limit me.
give me an example with user named test.
i want to limit him to be only in the directory of: /home/test
and I think my passwd file is shadowed.
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 07:37 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0