Sponsored Content
Top Forums UNIX for Advanced & Expert Users Setup SUDO For a User on Linux Server Post 302440296 by STOIE on Monday 26th of July 2010 09:02:49 PM
Old 07-26-2010
Problem is you are allowing them to tail a file, this means they will be able to look at the contents of pretty much anything they want.

for instance:
sudo tail /root/.ssh/authorized_keys

Catch my drift???

I would say chgrp the files you want them to be able to tail, to a newly created group, toss the old group owner into that group and add matt and john to the new group.

This way they can only access the files that you chgrp to the new group.

This seems to becoming more of a permissions question than a sudo question...
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

setup of user a/c in mysql in linux

Hi Friends, I am new user of linux operating system. I wanted to install a software but facing a difficulty. I am not able to proceed to the next statement without resolving this. WFT is the software i need for my purpose. Setup a MySQL user account for WTF that will have access to ... (1 Reply)
Discussion started by: alma
1 Replies

2. Linux

how to setup a virtual IP to control 2 server load for linux

Hi anyone know how to setup a setup a virtual IP to control 2 server load for linux? i only have 2 server, i don want to buy another just for the load balance... is there a way to do it? Sumemr (0 Replies)
Discussion started by: summerpeh
0 Replies

3. AIX

NIM server setup on etherchannel setup environment

I know that IBM's official stance is that NIM does not work on etherchannel environment, but has anyone able to get around it? I'm working on a p5-590 LPAR system, and the NIM master and clients are all on the same frame. Any help is appreciated. (1 Reply)
Discussion started by: pdtak
1 Replies

4. UNIX for Advanced & Expert Users

Remove and block a user from Linux server

Hi, Can anyone please guide me how can I remove/block a user from a server access. /usr/sbin/adduser -d /home/john john echo ****** | passwd --stdin john I used the above command to add a user "john". How do I delete and block john. Appreciate your responses. (1 Reply)
Discussion started by: sureshcisco
1 Replies

5. Linux

problems in linux mail server setup

hi i want to set up LInux mail server for intranet purpose. i used following document as reference Linux Mail Server softwares used are : Postfix # pre installed Procmail # pre installed Fetchmail # pre installed SpamBayes Mutt #... (1 Reply)
Discussion started by: zedex
1 Replies

6. AIX

sudo setup

I am working on setting sudo on a few AIX servers and wanted to know how to give users root access without allowing them access to the sudo logs, sudoers files and the /etc/security directory. (3 Replies)
Discussion started by: daveisme
3 Replies

7. Red Hat

setup sudo for cmd exec w/o password

i need to set up a user to execute a restricted command as another user and to be able to do so without entering a password. I understand the security concerns but let's not go there, unless you are really compelled to do so... The directive to permit is that I believe should work and did add to... (2 Replies)
Discussion started by: twk
2 Replies

8. Linux

Linux- Useradd / sudo user

Hi, I am new in linux. Please help for create new user and also need to give sudo access in linux box. Please help me Now i am having new access Thanks, Mani (2 Replies)
Discussion started by: Mani_apr08
2 Replies

9. UNIX for Dummies Questions & Answers

Samba setup in virtual server environment Windows/ Linux

I have a home network set up that consists of a few windows clients and 3 centos, and 1 suse client. These are all virtual machines, VMware Workstation. One centos vm is set to be the Samba server. Do I need Samba set up on the other Linux clients?I have no problem seeing the windows clients... (0 Replies)
Discussion started by: ktb231
0 Replies

10. UNIX for Advanced & Expert Users

Setup Samba Server to always ask user and password

How do I setup a Samba server to always ask to user and password, when a windows user, prints your files using a shared printer through a Samba Linux Server (CUPS)? (0 Replies)
Discussion started by: viga
0 Replies
chgrp(1)							   User Commands							  chgrp(1)

NAME
chgrp - change file group ownership SYNOPSIS
chgrp [-fhR] group file... chgrp -R [f] [-H | -L | -P] group file... DESCRIPTION
The chgrp utility will set the group ID of the file named by each file operand to the group ID specified by the group operand. For each file operand, it will perform actions equivalent to the chown(2) function, called with the following arguments: o The file operand will be used as the path argument. o The user ID of the file will be used as the owner argument. o The specified group ID will be used as the group argument. Unless chgrp is invoked by a process with appropriate privileges, the set-user-ID and set-group-ID bits of a regular file will be cleared upon successful completion; the set-user-ID and set-group-ID bits of other file types may be cleared. The operating system has a configuration option _POSIX_CHOWN_RESTRICTED, to restrict ownership changes. When this option is in effect, the owner of the file may change the group of the file only to a group to which the owner belongs. Only the super-user can arbitrarily change owner IDs, whether or not this option is in effect. To set this configuration option, include the following line in /etc/system: set rstchown = 1 To disable this option, include the following line in /etc/system: set rstchown = 0 _POSIX_CHOWN_RESTRICTED is enabled by default. See system(4) and fpathconf(2). OPTIONS
The following options are supported. /usr/bin/chgrp and /usr/xpg4/bin/chgrp -f Force. Does not report errors. -h If the file is a symbolic link, this option changes the group of the symbolic link. Without this option, the group of the file referenced by the symbolic link is changed. -H If the file specified on the command line is a symbolic link referencing a file of type directory, this option changes the group of the directory referenced by the symbolic link and all the files in the file hierarchy below it. If a symbolic link is encoun- tered when traversing a file hierarchy, the group of the target file is changed, but no recursion takes place. -L If the file is a symbolic link, this option changes the group of the file referenced by the symbolic link. If the file specified on the command line, or encountered during the traversal of the file hierarchy, is a symbolic link referencing a file of type directory, then this option changes the group of the directory referenced by the symbolic link and all files in the file hierarchy below it. -P If the file specified on the command line or encountered during the traversal of a file hierarchy is a symbolic link, this option changes the group of the symbolic link. This option does not follow the symbolic link to any other part of the file hierarchy. Specifying more than one of the mutually-exclusive options -H, -L, or -P is not considered an error. The last option specified determines the behavior of chgrp. /usr/bin/chgrp -R Recursive. chgrp descends through the directory, and any subdirectories, setting the specified group ID as it proceeds. When a symbolic link is encountered, the group of the target file is changed, unless the -h or -P option is specified. However, no recur- sion takes place, unless the -H or -L option is specified. /usr/xpg4/bin/chgrp -R Recursive. chgrp descends through the directory, and any subdirectories, setting the specified group ID as it proceeds. When a symbolic link is encountered, the group of the target file is changed, unless the -h or -P option is specified. Unless the -H, -L, or -P option is specified, the -L option is used as the default mode. OPERANDS
The following operands are supported: group A group name from the group database or a numeric group ID. Either specifies a group ID to be given to each file named by one of the file operands. If a numeric group operand exists in the group database as a group name, the group ID number associated with that group name is used as the group ID. file A path name of a file whose group ID is to be modified. USAGE
See largefile(5) for the description of the behavior of chgrp when encountering files greater than or equal to 2 Gbyte (2**31 bytes). ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of chgrp: LANG, LC_ALL, LC_CTYPE, LC_MES- SAGES, and NLSPATH. EXIT STATUS
The following exit values are returned: 0 The utility executed successfully and all requested changes were made. >0 An error occurred. FILES
/etc/group group file ATTRIBUTES
See attributes(5) for descriptions of the following attributes: /usr/bin/chgrp +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ |CSI |Enabled (see NOTES) | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ /usr/xpg4/bin/chgrp +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWxcu4 | +-----------------------------+-----------------------------+ |CSI |Enabled (see NOTES) | +-----------------------------+-----------------------------+ |Interface Stability |Standard | +-----------------------------+-----------------------------+ SEE ALSO
chmod(1), chown(1), id(1M), chown(2), fpathconf(2), group(4), passwd(4), system(4), attributes(5), environ(5), largefile(5), standards(5) NOTES
chgrp is CSI-enabled except for the group name. SunOS 5.10 25 Nov 2003 chgrp(1)
All times are GMT -4. The time now is 03:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy