LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-26-2020, 12:04 PM   #61
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled

Quote:
Originally Posted by Tonus View Post
I would fallback to tty, delete and recreate user (to avoid any further problems !) with it's attributes including home folder. Then login and copy.
means i have to use ArchISO then mnt the internal disk, remove user, create new user? what do you mean with with it's attributes including home folder.removing them?

Then login and copy what do you mean by login and copy?also done via ArchISO i guess? copy paste of ArchBackup into the internal disk?
 
Old 09-26-2020, 12:13 PM   #62
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,386

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Another thought, sometimes deleting configuration files in home folder will do the trick, so maybe after copying your user folder over delete all .* files and sub-files in the user folder

Last edited by colorpurple21859; 09-26-2020 at 12:17 PM.
 
Old 09-26-2020, 12:19 PM   #63
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Another thought, sometimes deleting configuration files in home folder will do the trick, so maybe after copying your user folder over delete all .* files and sub-files in the user folder
this is after i would have done the thing Tonus said?. how to do that? sorry but i got pretty frustrated because i remember last time i made a mistake on the Arch, i just copied the home folder and that was it...no extra steps were needed.
 
Old 09-26-2020, 12:59 PM   #64
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
From tty means from the console that launch the graphical login manager. Usually found with Ctrl+alt+f1 or 2
There, login as root, remove the user and re-create it.
You will have a clean user wich will be able to log.
Then log with this empty user and copy backup

Last edited by Tonus; 09-26-2020 at 01:00 PM. Reason: Typo, hate posting in english without proper corrector
 
Old 09-26-2020, 01:08 PM   #65
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tonus View Post
From tty means from the console that launch the graphical login manager. Usually found with Ctrl+alt+f1 or 2
There, login as root, remove the user and re-create it.
You will have a clean user wich will be able to log.
Then log with this empty user and copy backup
i tried
Code:
userdel -r myusername
and i got
Code:
userdel: user myusername is curecntly used by process 473
shall i create a new user first?

Last edited by Arch4GoodieLike; 09-26-2020 at 01:13 PM.
 
Old 09-26-2020, 05:01 PM   #66
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,386

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Code:
userdel: user myusername is curecntly used by process 473
does this mean your able to login with your username in a tty console? If your able to login with your usrname in a tty, can you write files to the user home directory?

Last edited by colorpurple21859; 09-26-2020 at 05:20 PM.
 
Old 09-27-2020, 01:54 AM   #67
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Code:
userdel: user myusername is curecntly used by process 473
does this mean your able to login with your username in a tty console?
i guess so since tty said "login" then i had to write the name and pw for it.

Quote:
Originally Posted by colorpurple21859 View Post
If your able to login with your usrname in a tty, can you write files to the user home directory?
how could i test that?

Last edited by Arch4GoodieLike; 09-27-2020 at 01:57 AM.
 
Old 09-27-2020, 02:28 AM   #68
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Code:
ls -al > write-test.txt
While in your home dir.

If it doesn't throw an error, you could share the content (via pastebin for instance)
 
Old 09-28-2020, 02:08 AM   #69
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tonus View Post
Code:
ls -al > write-test.txt
While in your home dir.

If it doesn't throw an error, you could share the content (via pastebin for instance)
i'm terribly sorry for the late reply, i had a quite busy day yesterday.
https://ibb.co/52MLCJZ
 
Old 09-28-2020, 06:05 AM   #70
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,386

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
login into a tty as root
Code:
chown -hR <user name> /home/<usr directory>
try and log in to your desktop. If it doesn't work. reboot and then try it. What this does is change owner of your home directory back to your user.

Last edited by colorpurple21859; 09-28-2020 at 06:07 AM.
 
Old 09-28-2020, 06:14 AM   #71
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
login into a tty as root
Code:
chown -hR <user name> /home/<usr directory>
try and log in to your desktop. What this does is change owner of your home directory back to your user.
it worked! what now?
 
Old 09-28-2020, 06:40 AM   #72
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,386

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
it worked! what now?
Great
IF everything is working, mark the thread solved in thread tools.

Last edited by colorpurple21859; 09-28-2020 at 06:41 AM.
 
Old 09-28-2020, 06:45 AM   #73
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
Great
IF everything is working, mark the thread solved in thread tools.
well the thing is it looks like the same as before cp my /home because its empty.

so if i want to replace /home, i do
Code:
fdisk -l
# make directory for /mnt/sda3
mkdir /mnt/sda3

# create mountpoint for /dev/sda3 /mnt/sda3
mount /dev/sda3 /mnt/sda3

# make directory for /mnt/sdc
mkdir /mnt/sdc

#make encrypted disk accessable
cryptsetup luksOpen /dev/sdc ArchBackup

# create mountpoint for /dev/mapper/ArchBackup /mnt/sdc
mount /dev/mapper/ArchBackup /mnt/sdc

# copy paste backup of home to sda1 and replace /home in destination
cp -ax /mnt/sdc /mnt/sda3/home/
or have i to change something in the "code text" ?
 
Old 09-28-2020, 08:00 AM   #74
Tonus
Senior Member
 
Registered: Jan 2007
Location: Paris, France
Distribution: Slackware-15.0
Posts: 1,407
Blog Entries: 3

Rep: Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514Reputation: 514
Best is to copy your files while not using them. That's why you will usually be advised to copy the files while booted in a live OS.

What are you trying to achieve now ? Restore a backup ?
If none of the mentionned disks are actually in use you're good to go. If sda3 is the home partition, do not do that part where you're creating a mount point for it
 
Old 09-28-2020, 08:20 AM   #75
Arch4GoodieLike
Member
 
Registered: Sep 2020
Location: Cave
Distribution: Arch Linux
Posts: 143

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Tonus View Post
Best is to copy your files while not using them. That's why you will usually be advised to copy the files while booted in a live OS.

What are you trying to achieve now ? Restore a backup ?
If none of the mentionned disks are actually in use you're good to go. If sda3 is the home partition, do not do that part where you're creating a mount point for it
sda3 is the internal disk partition Linux filesystem.i just want to replace internal /home with the backup /home folder.

how would the whole process look to make it work?
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Remote Backup script needed | backup every 1-2 seconds (Online/Hot backup) reda Linux - Newbie 4 04-20-2019 05:02 PM
Replacing BIOS jmh72 Linux - Laptop and Netbook 10 04-07-2018 05:59 PM
[SOLVED] Backup, shrink backup and modify MBR of backup jps1x2 Linux - General 1 12-17-2013 05:03 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:57 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