Is it possible to change default directory for root user?

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Author Message
Sopalajo de Arrierez
DD-WRT Novice


Joined: 04 Dec 2015
Posts: 16

PostPosted: Fri Jun 12, 2020 0:59    Post subject: Is it possible to change default directory for root user? Reply with quote
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.
Sponsor
yoyoma2
DD-WRT User


Joined: 24 Sep 2016
Posts: 371

PostPosted: Sat Jun 13, 2020 4:41    Post subject: Reply with quote
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
Sopalajo de Arrierez
DD-WRT Novice


Joined: 04 Dec 2015
Posts: 16

PostPosted: Sat Jun 13, 2020 16:58    Post subject: What about shadow packages? Reply with quote
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
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum