I just created a similar file for the 'root' user and I still get the same error - how can that be! I thought the 'root' user should be able to run any command regardless!!!!Ĭhanged the permissions for the. Further, the user 'anyone' has the privilege to run any command in my 'sudoers' file, wrong thing to do, I know but I thought that would allow it to run such a command. Why do I get this error when I previously ran the 'su' command. In fact, just ran it now and I get the 'Permission Denied' error. Will keep you posted on the outcome of that! ssh directory in the 'anyone' home directory and then try and execute the script file by running this statement I am now going to create a file called 'shutdownfreenas.sh' file in the. Your other recommendation is very good - I actually wanted to do that but didn't know how! I have checked about 'which shutdown' and it does say '/sbin/shutdown'įYI - I just tried to execute these statement from the "anyone" login interface :. I read somewhere that it needs to be a local file - not sure if its supposed to be local to Windows PC or FreeNAS PC. I understand that it need a file name after the -m option. Thanks for your response but that suggestion of your didn't work - the error was "Could not open the command file". The shutdownfreenas.txt file contains the "sudo shutdown -p now" command This will not prompt for File-Save in any open applications. ssh/shutdownfreenas.txt - running this command under "anyone" or root login (from shell) gave permission denied error even the sudoers file in /conf/base/etc/local/sudoers has these lines :- If you want to force an immediate shutdown then use the /f option: /f Force running applications to close. I also tried it with this command in the file The file "ShutdownFreeNASCmdFile.txt" contains this command Putty -ssh -pw mypassword -m "D:\FreeNAS_Server_Shutdown_Files\ShutdownFreeNASCmdFile.txt" What I want to do is to use the -m option which, I understand, requires a local (not sure if this is supposed to be local to the Windows PC or the FreeNAS PC) script file that contains the command to be run on the linux/freeBSD terminal like so :. I have created a password authenticated (for some reason my public key authentication doesn't seem to work) PuTTy session that works and I am able to log in by either typing the following command at the dos prompt or having that in a batch file :. I need to be able to turn of the FreeNAS PC using a batch script file from Windows PC using PuTTy SSH (Neither Plink nor public key authentication for PuTTy SSH seem to work for me). I thought its best to have a separate thread for this one.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |