sunnyone / synouidmod Goto Github PK
View Code? Open in Web Editor NEWChanging uid/gid of users on Synology NAS
Changing uid/gid of users on Synology NAS
Hi,
Thanks for this tool !
Purchased a DS920+ to replace a very old ReadyNAS.
I've managed to compile and run your tool on DS920+, after backing up the synosdk folder.
I've managed to change the UID of my user to keep it the same as various other systems to be able to use NFS without the need for UID mappers etc.
However, changing the UID to less than 1000 makes it disappear from the Synology web UI.
For the moment i have therefore changed it back.
Do you know if there is a way to patch also the web UI to be able to show and configure users even if you changed them to something below 1000 ?
Or do you know of another workaround ?
Cheers.
Hi @sunnyone ,
I needed to change a UID temporarily after updating to 6.2.4 to be able to change something in the UI, but the synouidmod tool no longer seems to work in 6.2.4.
romain@nas:[/opt/builds/synouidmod/build]$ sudo ./synouidmod romain 1026 100
Database opened successfully
User 'ROMAIN' has been found: username=romain, uid=500, gid=100
Modifying 'romain' to uid=1026, gid=100
Update failed
It worked fine back in december on DSM 6.2.3.
I rebuilt the tool on 6.2.4 thinking it might have to be rebuilt on top of the updated version of the dependencies, but didn't work as well. I'm not familiar with the synology SDK unfortunately. Do you know what the issue could be ?
Thanks,
Romain.
Hello @sunnyone,
I've been able to successfully compile synouidmod
(Target: DSM 6.2, Plattform apollolake).
However, synouidmod
doesn't seem to work.
No matter which user I pass as an argument, the errror is always User XYZ is not found
void@nas:/volume1/test$ sudo ./synouidmod plex
User 'plex' is not found.
plex:$XXXXXXXX/:17690:0:99999:7:::
Am I doing something wrong or is this a bug?
synouidmod seems not work with DSM newest 6.23
The Error message is:
-ash: ./synouidmod: cannot execute binary file: Exec format error
Please take a look.
Hello again @sunnyone,
I found another problem: The changes made by synouidmod
are not persistent.
If you reboot DSM, all changes are lost.
admin@vdsm:/volume1/workspace$ sudo ./synouidmod test 10123 10234
Database opened successfully
User 'test' has been found: username=test, uid=1026, gid=100
Modifying 'youtrack' to uid=10123, gid=10234
Update successfull
# reboot ...
admin@vdsm:/volume1/workspace$ sudo ./synouidmod test
Database opened successfully
User 'TEST1' has been found: username=test, uid=1026, gid=100
No modifications applied to database
Is there something we can do or is synouidmod
working as intended?
In the latter case my solution would be to create a script and execute it after every start of DSM
id -u USERNAME
(which reads /etc/passwd
) doesn't work too. Take a look at this please:
admin@vdsm:/volume1/workspace# ./synouidmod test 9000 100
Database opened successfully
User 'TEST' has been found: username=test, uid=1026, gid=100
Modifying 'test' to uid=9000, gid=100
Update successfull
admin@vdsm:/volume1/workspace# ./synouidmod test
Database opened successfully
User 'TEST' has been found: username=test, uid=9000, gid=100
No modifications applied to database
adim@vdsm:/volume1/workspace# id -u test
1026
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.