![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| 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 !! |
|
|
||||
| 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 05: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 04:43 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||
|
|||
|
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
|
||||
|
||||
|
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 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
|
|||
|
|||
|
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 |