Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Solved] Persist home folder

Featured Replies

When sshing into unraid what is the best way for me to persist my home folder on reboots? Can I move the home folder for root to my cache drive? Should I be logging in as an alternate user instead of root and then I create his home folder on a separate drive? Should I somehow cp the data away from the home folder and then back in my go script? I ssh into the box a lot and would like to run some command line stuff. I'm assuming someone else around here has been in the same boat at some point.

I cp stuff into the home directory from the flash using the go file. To copy stuff back you'll have to modify one of the shutdown scripts.

  • Author

Cool thanks. Can you elaborate as to which script I should add the cp commands to when I'm shutting down (assuming it happens cleanly). I guess I could always add it to the cache drive script that gets ran every night right?

Hi

 

My solution to this problem was as follows

 

Create a folder on the cache drive called 'home', so /mnt/cache/home - make it a cache only share, no need to share it (well I didn't want to)

 

add the following to your 'go' script

 

# Copy and Create user home directories
home='/mnt/cache/home/'

for u in $(cat /etc/passwd | grep /home | cut -d: -f1)
do
  if [ ! -d "$home$u" ]; then
   echo Directory $home$u does not exist - creating
   mkdir $home$u
   chown $u:users $home$u
   chmod 700 $home$u
  fi
  usermod -d $home$u $u
done

 

Then any user in the passwd file that has a home directory defined (which would normally be /home/???) will have it moved to the /mnt/cache/home version (creating it if necessary).  Obviously you can change the variable definition in the script above to point to wherever you create your 'home' folders!

 

May not be the most elegant manner of doing this - but it works perfectly for me and allows me to have the .ssh folder in the appropriate places for access :)

 

You can't move root in this manner but then it encourages me to prevent root from logging in full stop:)

 

unRAID is not designed as a user login system. The Linux permissions required for SMB,  AFP, and NFS integration mean that there is no internal user-to-user security. Every account will have access to most of the share files and there is no way to fix this without breaking the share system.

True and I'm not trying to resolve that. I just wanted to have my ssh key maintained across boots for the ssh user and having a generic solution was just as easy as a bespoke file copy :)

  • Author

Thanks for that stourwalk. I'll check that out.

 

I know unraid wasn't designed to be a user login system but I like to access it via the shell and do different things. Currently I'm running a direct connect client (microdc2) and also a cli twitter client (ttytter). Perhaps I just need to figure out how to install a full distro and then run unraid on top of that?

Perhaps I just need to figure out how to install a full distro and then run unraid on top of that?

There is a wiki article covering how to do that.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.