Posted: Fri Jun 12, 2020 0:59 Post subject: Is it possible to change default directory for root user?
I would like to know about the potential dangers in changing the default home directory of the root user on my DD-WRT router.
I assume this can be done just by editing '/etc/passwd' .
I don't want to do it. I don't need to change it right now, but I think that knowing if it can be done, and if there are any risks on doing it, could become useful in a future.
Normally you should use system utilities to manage users but dd-wrt is a stripped down linux so don't expect all the utilities. Nevertheless, since the passwd file on dd-wrt is actually on the /tmp ramdisk, any manual changes to /etc/passwd wouldn't survive a reboot.
Code:
ls -l /etc/passwd
lrwxrwxrwx 1 root root 15 May 31 13:02 /etc/passwd -> /tmp/etc/passwd
Posted: Sat Jun 13, 2020 16:58 Post subject: What about shadow packages?
Well, I assume I could schedule changes at boot by using the tools on the shadow packages, that include 'shadow-useradd', 'shadow-groupadd', 'shadow-usermod'... etc, so I could change root password.
This is the sense for 'sudo' and many others packages, that deal with user management.
This is why, assuming it is possible in any manner, I was wondering about the implications (risks) of doing it