Sponsored Content
Operating Systems AIX How to restrict user to a particular directory? Post 302940257 by smurphy_it on Thursday 2nd of April 2015 11:34:15 AM
Old 04-02-2015
ssh

Good day. If this user is going to be connecting remotely by say ssh, then you can use the "chroot" functionality of openssh itself. You won't have to go through the whole configuration of setting up a 'chroot environment' as openssh will take care of that for you.

Take a look at your /etc/ssh/sshd_config file. You'll see the example section at the end of the file dealing with chroot's.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Restrict my search to current directory.

Hi every1, There is a folder with .lst files which has email id's of our project group. I want to find files which has my email id starting with sachin but i dont want find command to search subdirectories. I have read about prune but i didnt understand that. I am pretty new in this field.... (7 Replies)
Discussion started by: sachin.gangadha
7 Replies

2. UNIX for Advanced & Expert Users

Restrict FTP access to a single directory for only one user.

Hi All, It will be very great if you can help me in this issue. Thanks in advance. I need to enable FTP on a solaris9 server. I need to create a new user some "xxxxxx" and he can only FTP the files to and from between /tftpboot directory and network devices. Other users should not... (8 Replies)
Discussion started by: santhoshkumar_d
8 Replies

3. UNIX for Dummies Questions & Answers

how do U restrict a user to a single directory?

specifically - I don't need to restrict a user to a single directory - but I want them to be "ROOTED" to their home directory. so if my home directory is /home/onlyme when I login - if I do a pwd - I want to see: / but in real life I will be in /home/onlyme - it just appears as root to... (10 Replies)
Discussion started by: itobenon
10 Replies

4. UNIX for Dummies Questions & Answers

restrict one user to see only his home directory in his profile

Hi I need to restrict one user to see only his home directory and one more directory how i can do this in his profile. The OS is Red hat linux I create a user -- tec and group calle --tec one the user log in he will see /home/tec and he need to see /opt/load this dirctory... (6 Replies)
Discussion started by: aboorkuma
6 Replies

5. Red Hat

Restrict user to a particular directory

Hi I have a Fedora10 server and i need a particular user to view files only in a particular folder. All other files in other folders having "read" permission for all shouldn't be accessible to this user. Please let me know if ther's a way. Thanks, HG (5 Replies)
Discussion started by: Hari_Ganesh
5 Replies

6. Solaris

Restrict FTP User to a Directory

I am using Solaris 10 on SPARC. SunOS ddw 5.10 Generic_139555-08 sun4u sparc SUNW,SPARC-Enterprise I have put some text files in a directory '/u01/network' I want to create a ftp user which can just read the files in the network directory. The ftp user shouldn't be able to navigate or see... (4 Replies)
Discussion started by: fahdmirza
4 Replies

7. Solaris

How to restrict user to a specific directory in solaris 10

Hi all, I want to create a new user and grant him ONLY transfer files access to a specific directory where he can only upload and read the files. He should be restricted to this activity only. Regards (6 Replies)
Discussion started by: gilldn
6 Replies

8. Red Hat

Restrict user access

Hi there I have an application user on my system that wants accesses to these file systems as such: rwx: /SAPO /SAPS12 /R3_888 /R3_888B /R3_888F /R3_888R r: /usr/sap these are the existing FS permissions:ownerships: # ls -ld /SAPO (9 Replies)
Discussion started by: hedkandi
9 Replies

9. Solaris

restrict sudo and chown in specified directory

Hi Dears, I have one requirement like this: general user A can execute command C with root privilege by sudo configuration some folders and files are created during the command C execution user A cannot access those folders and files because the owner is root user, so I want the user A... (0 Replies)
Discussion started by: crest.boy
0 Replies

10. UNIX for Beginners Questions & Answers

Is there a way to restrict a user (owner) to execute scripts from a specific directory

Hello, I have a user Bob on a RHEL 7 server1. Where his script area is "/home/Bob/scripts/" and he is the owner for this directory. On the server1, there is a NFS mount from another server2, with path as "/global/work/" and Bob is the owner for this directory too in server2. (Same UID and GID... (5 Replies)
Discussion started by: karumudi7
5 Replies
Config::Model::Backend::Augeas(3pm)			User Contributed Perl Documentation		       Config::Model::Backend::Augeas(3pm)

NAME
Config::Model::Backend::Augeas - Read and write config data through Augeas SYNOPSIS
# model specification with augeas backend { config_class_name => 'OpenSsh::Sshd', # try Augeas and fall-back with custom method read_config => [ { backend => 'augeas' , file => '/etc/ssh/sshd_config', # declare "seq" Augeas elements sequential_lens => [/AcceptEnv AllowGroups [etc]/], }, { backend => 'custom' , # dir hardcoded in custom class class => 'Config::Model::Sshd' } ], # write_config will be written using read_config specifications element => ... } DESCRIPTION
This class provides a way to load or store configuration data through Config::Augeas. This way, the structure and commments of the original configuration file will preserved. To use Augeas as a backend, you must specify the following "read_config" parameters: backend Use "augeas" (or "Augeas")in this case. save Either "backup" or "newfile". See "Constructor" in Config::Augeas for details. file Name of the configuration file. sequential_lens This one is tricky. Set to one when new Augeas list or hash node must be created for each new list or hash element. See "Sequential lens" for details. For instance: read_config => [ { backend => 'augeas' , save => 'backup', file => '/etc/ssh/sshd_config', # declare "seq" Augeas elements sequential_lens => [/AcceptEnv AllowGroups/], }, ], Sequential lens Some configuration files feature data that must be written as list or as hash. Depending on the syntax, Augeas list or hash lenses can be written so that new "container" nodes are required for each new element. For instance, "HostKey" lines can be repeated several times in "sshd_config". Since Augeas must keep track of these several lines, Augeas tree will be written like: /files/etc/ssh/sshd_config/HostKey[1] /files/etc/ssh/sshd_config/HostKey[2] /files/etc/ssh/sshd_config/HostKey[3] and not: /files/etc/ssh/sshd_config/HostKey/1 /files/etc/ssh/sshd_config/HostKey/2 /files/etc/ssh/sshd_config/HostKey/3 The "HostKey" node is created several times. A new hostkey must be added with the following syntax: /files/etc/ssh/sshd_config/HostKey[4] and not: /files/etc/ssh/sshd_config/HostKey/4 So the "HostKey" lens is sequential. The situation is more complex when syntax allow repeated values on several lines. Like: AcceptEnv LC_PAPER LC_NAME LC_ADDRESS AcceptEnv LC_IDENTIFICATION LC_ALL Augeas will have this tree: /files/etc/ssh/sshd_config/AcceptEnv[1]/1 /files/etc/ssh/sshd_config/AcceptEnv[1]/2 /files/etc/ssh/sshd_config/AcceptEnv[1]/3 /files/etc/ssh/sshd_config/AcceptEnv[2]/4 /files/etc/ssh/sshd_config/AcceptEnv[2]/5 Note that the first index between squarekeeps track of how are grouped the "AcceptEnv" data, but the real list index is after the slash. Augeas does not require new elements to create "AcceptEnv[3]". A new element can be added as : /files/etc/ssh/sshd_config/AcceptEnv[2]/6 So this lens is not sequential. The same kind of trouble occurs with hash elements. Some hashes tree are like: /files/etc/foo/my_hash/my_key1 /files/etc/foo/my_hash/my_key2 Others are like: /files/etc/foo/my_hash[1]/my_key1 /files/etc/foo/my_hash[2]/my_key2 Note that a list-like index is used with the hash key. This also depends on the syntax of the configuration file. For instance, "Subsystem" in "sshd_config" can be : Subsystem sftp /usr/lib/openssh/sftp-server Subsystem fooftp /usr/lib/openssh/fooftp-server Subsystem barftp /usr/lib/openssh/barftp-server This (unvalid) sshd configuration is represented by: /files/etc/ssh/sshd_config/Subsystem[1]/sftp /files/etc/ssh/sshd_config/Subsystem[2]/fooftp /files/etc/ssh/sshd_config/Subsystem[3]/barftp Any new Subsystem must be added with: /files/etc/ssh/sshd_config/Subsystem[4]/bazftp In this case, the hash is also sequential. For these examples, the augeas backend declaration must feature: sequential_lens => [qw/HostKey Subsystem/], Augeas backend limitation The structure and element names of the Config::Model tree must match the structure defined in Augeas lenses. I.e. the order of the element declared in Config::Model must match the order required by Augeas lenses. Sometimes, the structure of a file loaded by Augeas starts directly with a list of items. For instance "/etc/hosts" structure starts with a list of lines that specify hosts and IP addresses. The "set_in" parameter specifies an element name in Config::Model root class that will hold the configuration data retrieved by Augeas. Log and trace This module use Log::Log4perl to log debug and info trace with "Data::Read" and "Data::Write" categories. CAVEATS
o Augeas "#comment" nodes are ignored SEE ALSO
o http://augeas.net/ : Augeas project page o Config::Model o Augeas mailing list: http://augeas.net/developers.html o Config::Model mailing list : http://sourceforge.net/mail/?group_id=155650 AUTHOR
Dominique Dumont, <ddumont at cpan dot org@<gt> COPYRIGHT
Copyright (C) 2008-2010 by Dominique Dumont LICENSE
This library is free software; you can redistribute it and/or modify it under the LGPL terms. perl v5.14.2 2012-07-10 Config::Model::Backend::Augeas(3pm)
All times are GMT -4. The time now is 09:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy