Jump to content

Problem scanning CentOS system


Recommended Posts

Get following error:

 

Scan failed: SSH: (95%) Cannot create file "C:\Users\tmmathen\AppData\Local\Temp\1\TNITEMPSCANDIR\etc\sudoers: syntax error near line 26 <<<

sudo: parse error in \etc\sudoers near line 26

sudo: no valid sudoers sources found, quitting". The filename, directory name, or volume label syntax is incorrect

 

 

Link to comment

Yes, it's possible. Actually, this error message is quite specific and it would better be sent to our support email rather than the forums, but... As we are already here, this is the original error message:

 

>>> etc\sudoers: syntax error near line 26
sudo: parse error in \etc\sudoers near line 26
sudo: no valid sudoers sources found, quitting

 

The problem is that you have syntax error in your "\etc\sudoers" file. Your admins should fix this file. The non-root user that you use should be specified in sudoers correctly to be able to run the scan, and the file should not contain errors.

 

The error that the program itself throws:

 

Cannot create file "C:\Users.....". The filename, directory name, or volume label syntax is incorrect

 
is secondary and appears because the program receives the filename for saving the scan results after the ">>>" sequence which appears in the sudo error. So as soon as the sudoers file is fixed, you should be running fine.
Link to comment
  • 2 weeks later...

OK - the first error above was because the Unix admin had disabled the account within sudoers for troubleshooting until we got an answer.

 

The issue is we are trying to use a regular account to run the scan. So we add a command into the sudoers file to run the scan program, but it appears because the file (tnilinagent_x64) with the aurguments, which  may not be able to be globbed (this is the Unix guys terms)  presented to it doesn't actually exist when it elevates the user to root, it ignores the syntax, and it appears that about half of the files that needed to be executad do not exist in CentOS. Below is the syntax we are using - however, using this syntax, this is where we get this error:

 

"Cannot create file "C:\Users.....". The filename, directory name, or volume label syntax is incorrect"

 

Cmnd_Alias SCAN = /bin/arch, /bin/df, /usr/bin/head, /sbin/ifconfig, /sbin/iptables, /sbin/iptables-save, /bin/ls, /bin/ps, /sbin/pvdisplay, /sbin/pvscan, /sbin

/route, /bin/rpm, /sbin/swapon, /bin/uname /sbin/service, /sbin/chkconfig, /home/scanman/tnilinagent_x64

 

<scanning-userid>       ALL=(SCAN)

 

 

Can you provide an example of the syntax including the arguments please?

Link to comment

I'm not sure what are you trying to do here. Allow this regular account to run only specified programs (with specified full paths) or what? If so, this will fail, because tnilinagent is always uploaded to a randomly named directory in the home directory of a user, and then also unpacked to another random temp directory, so the path where it's run from is never known beforehand.
You can always run the scan manually, if needed:

chmod 755 tnilinagent_x64
./tnilinagent_x64 -silent

I'm not a master of setting up the sudoers file, but from what I know, you only need to specify the user in it to allow him to elevate to root. If you have further restrictions, that may not work: you should consult with your Unix admins.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...