If you, like I also did, locked yourself out like in this thread:
I got this error:
sudo: /etc/sudoers is world writable
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
I do not support and can not be held responsible for any damage this would do to your device. I only state that it worked for me.
Now I explain what worked for me.
Install Config FIle Editor package in your DSM-package center. It can be found here.
Now you can use Config File Editor to edit your versionnumber and do a downgrade.
First add this line to the config file editor
Close down the Config File Editor and open it again. Choose version in the drop down.
Change buildnumber to eg 7100.
Now you can do a manual downgrade to beta 1 – this gives you your root access back (find the update icon in control panel and do a manual installation af the DSM 6.0 beta 1)
Find your DSM 6.0 Beta 1 here:
It bricked my Synology. Now I was not able to access my DSM.
But I still/now could login with my root login and pass through SSH.
So login to your NAS with your normal root login and password. (I use PuTTY as explained here – use ssh and type the local ip to your NAS).
Change sudoers chmod to 0440 in the etc-folder
chmod 0440 sudoers
Thereafter you are able to upgrade from command line with this command, that I found here.
synoupgrade Copyright (c) 2003-2012 Synology Inc. All rights reserved. --auto --check --download --start --parse --patch ABSOULATE_UPGRADE_FILE_PATH
I used synoupgrade –auto (that worked, 10-15 min. later it was updated and accessible again)
It did display some errors, but ended up with
Then it restarted and voila – it works.
Hope it workes for you to.
4 kommentarer til “chmod /etc/sudoers to 0640 and locked myself out of DSM 6.0 – SOLVED/SOLOUTION!”
[…] chmod /etc/sudoers to 06… […]
Since this post synology have removed all other builds of 6.0 (release and beta).
So my question is, is it possible to do the same with downgrading to 5.0, then back up to 6.0?
Hi Egil. See this forum-tread for an easy way to solve this problem. Find the post from CoolRaoul
Found a simple and easy solution
log in to DSM Web interface as admin
Control Panel -> “Task scheduler”
Add a “user script”:
make it disabled:
insert command which will reset the correct modes (chmod ug=r,o= /etc/sudoers)
Should be fixed now
Thx for posting this.