Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Need a command

Posted on 2009-06-29
6
Medium Priority
?
386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

 
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 1000 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

Implementing Azure Infrastructure Exam 70-533

This course is designed to familiarize and instruct students in the content that is covered by Microsoft Exam 70-533, Implementing Microsoft Azure Solutions. It focuses on all the November 2016 objective domain topics.

Question has a verified solution.

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

The purpose of this article is to demonstrate how we can use conditional statements using Python.
Fine Tune your automatic Updates for Ubuntu / Debian
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Suggested Courses

670 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