LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-19-2017, 05:11 PM   #1
brianmay27
Member
 
Registered: Apr 2006
Posts: 82

Rep: Reputation: 15
initramfs has a random root user home folder


Hey guys,

Im trying to have a ssh server launch in initramfs so I can enter the disk encryption remotely. Ideally I would love to have a .profile under the root user so when I ssh in it will launch the script to prompt for the password. It seems however that the root home directory is randomly generated during update-initramfs -u so I cant have a hook script that pushes in a .profile (without just using wildcards/find). Ive also tried to add a .profile file under /etc/initramfs-tools/root/.profile but that does not seem to be copied, only the .ssh/authorized_keys gets copied.

Anyone have a solution to this?
 
Old 05-25-2017, 05:00 PM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Newark Ohio
Distribution: Fedora Core
Posts: 270

Rep: Reputation: 38
You could manually cpio extract the init to a directory, modify it and cpio it back into an init after making the changes.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
extracting root folder to a user home folder command mzein1292 Linux - Newbie 3 06-23-2015 07:26 AM
[SOLVED] Not able to create folder in home dir as root user vedaprasad Linux - Newbie 5 04-17-2012 04:34 AM
[SOLVED] Seperating Home folder from Root Folder to a new partition. baxzius Linux - Newbie 5 08-01-2011 03:26 PM
Thunar, aterm, etc. launching into random folder vs. home directory kryptobs2000 Linux - Software 2 10-30-2007 07:48 PM
permissions difference between /home/..../folder and /root/folder darkleaf Linux - General 3 07-21-2005 05:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration