OpenVZ Forum


Home » General » Support » VE login via normal user on HN
VE login via normal user on HN [message #28480] Wed, 19 March 2008 22:27 Go to next message
onegwr is currently offline  onegwr
Messages: 2
Registered: March 2008
Location: Belgium
Junior Member
Hi all,
* I would like to login as a normal user 'vps101' on the HN
and would like to get in a situation like you get after typing "vzctl enter 101". Syncing the password would be nice but is not needed.
* Putting "/usr/sbin/vzctl enter 101" as the shell in /etc/passwd did not did the trick for me.
* I have this trick in a hosted vz environment, so I know it's possible, but I'm unable to replicate it...

any suggestions?
thanks,
Oneg

[Updated on: Wed, 19 March 2008 22:30]

Report message to a moderator

Re: VE login via normal user on HN [message #28512 is a reply to message #28480] Fri, 21 March 2008 15:12 Go to previous messageGo to next message
maratrus is currently offline  maratrus
Messages: 1495
Registered: August 2007
Location: Moscow
Senior Member
Hi,

1. Put /bin/bash for user vps101 in /etc/passwd file.
2. You can add appropriate record to vps101's .bashrc file. Something like that "/usr/sbin/vzctl enter 102" but keep in mind that you need permission to open /dev/vzctl so you need something like that "sudo /usr/sbin/vzctl enter 102"
icon7.gif  Re: VE login via normal user on HN [message #28520 is a reply to message #28512] Fri, 21 March 2008 21:54 Go to previous message
onegwr is currently offline  onegwr
Messages: 2
Registered: March 2008
Location: Belgium
Junior Member
Perfect! That did the trick!

in /home/vps101/.basrc I've added:
sudo /usr/sbin/vzctl enter 101
exit
exit was added to get logged-out after logging out of the VE...

via visudo I've added:
vps101     ALL=/usr/sbin/vzctl enter 101


Thank you for the advice!
Oneg
Previous Topic: Centos 5 6 gigs of ram not working
Next Topic: numothersock question
Goto Forum:
  


Current Time: Sun Aug 04 22:23:08 GMT 2024

Total time taken to generate the page: 0.02915 seconds