This is the old XigmaNAS forum in read only mode,
it will taken offline by the end of march 2021!



I like to aks Users and Admins to rewrite/take over important post from here into the new fresh main forum!
Its not possible for us to export from here and import it to the main forum!

[HOWTO] Log in a jail using his name

Jails with XigmaNAS
Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

[HOWTO] Log in a jail using his name

Post by raulfg3 »

12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [HOWTO] Log in a jail using his name

Post by alexey123 »

Good working idea!
But better way - create into jail SSH server and log into without nas4free host.
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4865
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: [HOWTO] Log in a jail using his name

Post by raulfg3 »

alexey123 wrote:But better way - create into jail SSH server and log into without nas4free host
Do you mean somethig like this:

How Do I Login Remotely (Directly) To Jail?
First, login using jexec command. Add the following line to jail /etc/rc.conf:
# echo 'sshd_enable="YES"' >> /etc/rc.conf
Open sshd_config file and update listen parameter to bind to jail IP only. Start OpenSSH server inside the jail:
# /etc/rc.d/sshd start
# sockstat -4
extract from : http://www.cyberciti.biz/faq/howto-setu ... th-ezjail/
12.1.0.4 - Ingva (revision 7743) on SUPERMICRO X8SIL-F 8GB of ECC RAM, 11x3TB disk in 1 vdev = Vpool = 32TB Raw size , so 29TB usable size (I Have other NAS as Backup)

Wiki
Last changes

HP T510

User avatar
alexey123
Moderator
Moderator
Posts: 1469
Joined: 19 Aug 2012 08:22
Location: Israel, Karmiel
Contact:
Status: Offline

Re: [HOWTO] Log in a jail using his name

Post by alexey123 »

In first, you must go to Services|SSH webgui and add to Extra options ListenAddress <your_nas _ip>
Image

In second create user for jail from nas4free host

Code: Select all

jexec 1 adduser
System will ask questions, for example:
Username:
Full name:
Uid (Leave empty for default):
Login group []: wheel
Login group is wheel. Invite alexey into other groups? []:
Login class [default]:
Shell (sh csh tcsh nologin) [sh]: csh
Home directory []:
Home directory permissions (Leave empty for default):
Use password-based authentication? [yes]: yes
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the account after creation? [no]:
Username :
Password : *****
Full Name :
Uid : 1001
Class :
Groups : wheel
Home :
Home Mode :
Shell : /bin/csh
Locked : no
OK? (yes/no): yes
adduser: INFO: Successfully added () to the user database.
Add another user? (yes/no): no
Goodbye!
After this see for example /var/etc/ssh/sshd_config and edit jail's /etc/ssh/sshd_config with some directives. But minor - under jail your root not have password, I define

Code: Select all

PermitRootLogin no

After edit config need add sshd_enable="YES" to /etc/rc.conf and start server

Code: Select all

/etc/rc.d/sshd start
You can switch user with su, and check whith whoami command
Home12.1.0.4 - Ingva (revision 7091)/ x64-embedded on AMD A8-7600 Radeon R7 A88XM-PLUS/ 16G RAM / UPS Ippon Back Power Pro 600
Lab 12.1.0.4 - Ingva (revision 7091) /x64-embedded on Intel(R) Core(TM) i3-3220 CPU @ 3.30GHz / H61M-DS2 / 4G RAM / UPS Ippon Back Power Pro 600

Post Reply

Return to “Jails”