View previous topic :: View next topic |
Author |
Message |
Degusss n00b
Joined: 19 Dec 2023 Posts: 1
|
Posted: Mon Jan 15, 2024 3:30 am Post subject: Issue when trying to su to another user after I chroot |
|
|
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 |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1476 Location: Germany
|
|
Back to top |
|
|
Goverp Advocate
Joined: 07 Mar 2007 Posts: 2027
|
Posted: Mon Jan 15, 2024 9:12 am Post subject: |
|
|
Degusss,
I think you need /etc/shadow as well. _________________ Greybeard |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54453 Location: 56N 3W
|
Posted: Mon Jan 15, 2024 9:22 am Post subject: |
|
|
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 |
|
|
|