What's new

Entware entware:: set HOME to external storage

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

adriansev

Occasional Visitor
Hi! What would be the procedure to set the entware based "/root" as the home for the admin user of the ruter?
I imagine some settings in /jffs/configs/profile.add but i'm not sure if it is a simple `[[ -e /opt/root ]] && export HOME=/opt/root`

Thanks a lot!
 
oh, i see!! well, i tried with the following while checking for id -u -eq 0
[ -d /opt/root ] && export HOME=/opt/root
[ -d /opt/root/bin ] && export PATH=/opt/root/.local/bin:/opt/root/bin:$PATH
 
and the behavior is that after ssh i land to the default /tmp/home/root and only after empty cd i go to /tmp/mnt/AC66U/entware/root

i thought to use usermod to change the home for admin (and put the command in post-mount) but there is no usermod ..
 
would be feasible to use s e d to change home written in passwd just after the external storage is mounted?
 
but i think that i have to be certain that external storage is mounted (which i'm not sure that is guaranteed in postconf scripts)
 
this is really weird behavior!! i had to try each word to find the culprit(s) and see above the splited words !!
 
make sure that IF external ssd is mounted then the admin (uid==0) home is /opt/root
Then the solution in post #2 should be all you need. Unless you've got a non-standard configuration the only interactive login account is the admin (UID=0) user. There aren't any other interactive login accounts so you don't need to cater for other UIDs.
 
Then the solution in post #2 should be all you need. Unless you've got a non-standard configuration the only interactive login account is the admin (UID=0) user. There aren't any other interactive login accounts so you don't need to cater for other UIDs.
it is a standard configuration. thanks a lot for taking from your time to answer and follow this thread! :)
 

Similar threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top