Solved

Need a command

Posted on 2009-06-29
6
379 Views
Last Modified: 2013-12-15
I need to give access to one group ...please advice with the commnads .
"sudo su  CDE* and sudo su -*XYZ access to ABCD account of the following servers"

Please advice

Thanks in advance!
0
Comment
Question by:prashantchauhan
6 Comments
 
LVL 14

Expert Comment

by:Deepak Kosaraju
ID: 24737251
Question is not clear can you elaborate.
0
 
LVL 23

Expert Comment

by:savone
ID: 24737343
I agree, it is not clear what your question is asking for.
0
 

Author Comment

by:prashantchauhan
ID: 24743377
sudo su  CDE* and sudo su -*XYZ(Folders) access to ABCD(It is a user group to who i need give sudo access for soem folders) account of the following servers"
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 16

Expert Comment

by:ai_ja_nai
ID: 24743463
Let me understand, because it's still really bad explained: do you need to give sudo access to a group of users? Or do you need to simply give rwx permission to a certain group?
0
 

Author Comment

by:prashantchauhan
ID: 24753681
I Apologies....Right one is "do you need to give sudo access to a group of users".


Thank You
0
 
LVL 4

Accepted Solution

by:
NVRAM earned 250 total points
ID: 24754017
If you try "man sudo" (under "FILES") it tells you which file under "/etc/" contains the configuration for "sudo" -- it sounds like you haven't tried that yet (but maybe you did, you really need to elaborate more on your questions and what you have tried so far!)

Within the "sudo" configuration file, there are lots of commented examples -- you can easily alias a list of commands and grant permissions for those to individual users or groups.

BUT - if I understand your wish, it is to:
   - Grant to user "ABCD" (on multiple servers) the ability to:
     - "su" to accounts with names starting with "CDE" or ending with "XYZ".

It appears you can configure "sudo" to run "su" with your desired arguments, but there doesn't seem to be any pattern-matching capability, so you would need to configure it to handle each target user name.

If there are more than a few, or if it changes often  you could easily create a small program (should take about 20-30 lines of C) to:
  1- confirm the UID or GID of the user (optional if run via "sudo"),
  2- confirm that the requested username matches the desired criteria,
  3- exec "su" with the desired parameters.

You can either create this program as SETUID root or allow it with "sudo"  The former is easier, but requires you be careful in step #1.  But "sudo" could do this for you and provide you with some record-keeping about when the program was used.

It would be possible, but is probably a security hole, to create this program as a shell script -- can anyone enlighten us/me if "sudo" grants on shell scripts are considered safe or bad?

=====

An entirely different solution would be to install public keys in target users' ~/.ssh directory and allow access via "ssh".  Might be harder to setup/configure but I can't tell from your description.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
In my business, I use the LTS (Long Term Support) versions of Linux. My workstations do real work, and so I rarely have the patience to deal with silly problems caused by an upgraded kernel that had experimental software on it to begin with from a r…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now