Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Issue when trying to su to another user after I chroot
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Degusss
n00b
n00b


Joined: 19 Dec 2023
Posts: 1

PostPosted: Mon Jan 15, 2024 3:30 am    Post subject: Issue when trying to su to another user after I chroot Reply with quote

Hi guys,

I've encounter a issue when trying to su to another user after I chroot.

My jail directory = /home/jail
/bin and /lib64 are copied into my jail directory
Passwd and group are also copied into my jail directory.
I've also created a new user called Alex and password= Alex

I login using: Ssh root@localhost (success)
But when key in: su - Alex
Msg return : su:incorrect password

I tried this command too:
Chroot /home/jail /bin/su - Alex
Msg return : bin/su:incorrect password

Any expert can guide me as I'm relative new to Linux.
I'm using Oraclelinux 6.8 OS
Back to top
View user's profile Send private message
Banana
Veteran
Veteran


Joined: 21 May 2004
Posts: 1337
Location: Germany

PostPosted: Mon Jan 15, 2024 6:34 am    Post subject: Reply with quote

Quote:
I'm using Oraclelinux 6.8 OS

Hello and welcome. This forum is about gentoo and not oracle linux
_________________
My personal space
My delta-labs.org snippets do expire

PFL - Portage file list - find which package a file or command belongs to.
Back to top
View user's profile Send private message
Goverp
Veteran
Veteran


Joined: 07 Mar 2007
Posts: 1966

PostPosted: Mon Jan 15, 2024 9:12 am    Post subject: Reply with quote

Degusss,

I think you need /etc/shadow as well.
_________________
Greybeard
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54028
Location: 56N 3W

PostPosted: Mon Jan 15, 2024 9:22 am    Post subject: Reply with quote

Moved from Gentoo Chat to Unsupported Software.

That does not mean you won't get support. It's a warning to future readers that solutions found here may not work on Gentoo.

Password hashes are stored in /etc/shadow.
If the user exists outside of the chroot, that will need to be copied too.

If the user was created inside the chroot, the account is locked until you set a password for it inside the chroot.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
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