All Questions
5 questions
0
votes
1
answer
303
views
Debugging a sudoers regex pattern for changing the IP address using sed in /etc/hosts file
I would like to change the IP address in /etc/hosts file using sed
Original file:
$ cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 ...
5
votes
1
answer
16k
views
Regex in Sudoers File? [closed]
I've a regex and want to use it in a sudoers file. But I couldn't get it work.
\/test\/([0-9a-zA-Z\/]+\.[0-9a-zA-Z]+)+
I found that it must be
\\/test\\/([0-9a-zA-Z\/]+\.[0-9a-zA-Z]+)+
But I didn'...
1
vote
2
answers
2k
views
Regular expressions in grep and sudoers
I am trying to parse a sudoers file that contains it's own versions of regular expressions, but cannot get a valid and consistent result. I need to be able to compare a variable to another that ...
0
votes
1
answer
117
views
Timed Shutdown Using Visudo
I am wanting to grant user user01 on my machine the ability to shut down the machine, but only with no less than 1 hour notice.
Essentially, this boils down to the following command:
shutdown -h +&...
1
vote
0
answers
204
views
Regex to parse sudoers User_Spec
Here is a sample User_Spec:
AOPS TRUSTED_HOSTS=(sysexec) ALL, (sqlexec) ALL : \
A_HOSTS=(root) SMF, \
(root) /usr/local/sbin/install-soft, \
(root) /...