Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
what i have set is below. I was wondering if there would be an easier way to allow the user access to the syslog to grep, vi, pico, more, or which ever way they want to view it. Or do i have to create a command in the sudoers file for each way?
There are varied possible approaches; a quick-fix would be to
make your user account member of the groups that have read-
access to the logs, in which case you won't need sudo at all.
You can list each command separated by ', ' as shown by the example in the sudoers manpage. Changing the permissions of the file or adding file acls may not work after log rotation. Some logs like Xorg.0.log are replaced each time. Looking at the syslog-ng.conf manpage, it seems that the gid() option is global, and you can't indicate facl's as an option as well.
So i separated each command with a comma shown below. From what I gathered from the man page the wildcard * could be used to match 0 to infinite characters, well maybe not that far but still for five and below it should have worked. however this doesnt seem to work? What am I doing wrong in regards to the wildcard? Seems to work otherwise.
I think you are confusing the BNF grammer definition of a command alias with the actual syntax:
Code:
Alias ::= 'User_Alias' User_Alias (':' User_Alias)* |
'Runas_Alias' Runas_Alias (':' Runas_Alias)* |
'Host_Alias' Host_Alias (':' Host_Alias)* |
'Cmnd_Alias' Cmnd_Alias (':' Cmnd_Alias)*
User_Alias ::= NAME '=' User_List
Runas_Alias ::= NAME '=' Runas_List
Host_Alias ::= NAME '=' Host_List
Cmnd_Alias ::= NAME '=' Cmnd_List
NAME ::= [A-Z]([A-Z][0-9]_)*
Each alias definition is of the form
Alias_Type NAME = item1, item2, ...
The asterisk here means that you can have zero or more ':' Cmnd_Alias entries.
Also note that the "," is to separate commands in a command list. An Alias list has aliases separated with colons.
Also look in the manpages and documentation for programs like vim and less. They can be configured to not allow the shell escape. For example, allowing rvim or grvim to be run as root but not vim. These will run vim in a more secure mode without the shell escape. Only allowing the more restrictive versions of these programs may be an easier way to go, but there will be a number of holes to plug.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.