Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Is it possible to allow a group/user to execute a command, where one of the parameters of the command is a group as well?
example that does not work as intended:
Code:
Cmnd_alias SU=/bin/su -l %group1
This example works sortof, it treats the "%group1" literally.
I know I can list out the "/bin/su -l <eachuser>", but as you can imagine that is impractical. In this example, I want people in group2(not shown for brevity sake) to be able to su to someone in group1
Let's say eng is everyone, the scripts group are misc users of which blah is a member of.
As a user in the eng group:
Code:
-bash-3.2$ sudo su -l SCRIPTS
Password:
su: user SCRIPTS does not exist
-bash-3.2$ sudo su -l blah
Sorry, user dummy is not allowed to execute '/bin/su -l blah' as root on localhost.localdomain.
sudo is still treating the parameter for su as a literal string
I am having a sudoers configuration problem. I have come from Ubuntu and I am now using Fedora 12. I want to write Bash shell scripts so I need to add 'Stephanie' to the sudoers list. I have type visudo but I don't know where to add my name to the sudoers list.
Typing grep -i scripts /etc/group produces no output just a return to the shell prompt.
I am not sure but most know editors like vi, vim, ed, nano + leafpad, geany, gedit, kate
in such cases installer (root) previleges might be needded with sudo
passwords are sometimes in files that are called "siesta"
try sudo grep
Quote:
[Stephanie@laptop ~]$ grep -i scripts /etc/group
the $ is used to indicate sudo while # root (suse and grub use > for example)
I am having a sudoers configuration problem. I have come from Ubuntu and I am now using Fedora 12. I want to write Bash shell scripts so I need to add 'Stephanie' to the sudoers list. I have type visudo but I don't know where to add my name to the sudoers list.
Typing grep -i scripts /etc/group produces no output just a return to the shell prompt.
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
rockdoctor ALL=(ALL) ALL
I just ran visudo as root and added the line you see above for user rockdoctor. Didn't mess with groups (the % sign in front of wheel indicates a group).
[root@fedora ~]# cat >> create-linux-file.txt
this is the line appends to create-linux-file.txt
this is an example on using redirection to appends text
## Allows people in group wheel to run all commands
# %wheel ALL=(ALL) ALL
rockdoctor ALL=(ALL) ALL
I just ran visudo as root and added the line you see above for user rockdoctor. Didn't mess with groups (the % sign in front of wheel indicates a group).
Rockdoctor, I added 'Stephanie' to the 'run all commands' section, but in vim when I do the following ':wq sudoers', I get the following 'E13: File exists (add ! to override)', I then enter :wq! sudoers and vim exits, but when I check the sudoers file in Nano all my changes have disappeared. Editing the sudoers list is no problem it is getting vim to write and exit that is now the problem.
If you open a file in vim, there's no need to specify the filename at exit. Also, :wq is the long version (write+quit). Just use :x (eXit with save), so
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.