Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 09-01-2015, 01:07 PM   #1
Registered: Apr 2012
Distribution: Ubuntu, SUSE, Redhat
Posts: 188

Rep: Reputation: Disabled
lxc new container how to set password

hi all

I just created my first container, but now I am a bit stuck.

You just created an Ubuntu container (release=precise, arch=amd64, variant=default)

To enable sshd, run: apt-get install openssh-server

For security reason, container images ship without user accounts
and without a root password.

Use lxc-attach or chroot directly into the rootfs to set a root password
or create user accounts.
test@container-host:~$ lxc-ls --fancy
mycontainer1 STOPPED - - NO

I have no clue how to use lxc-attach or chroot the set a root password.

How do I set the ubuntu container's password?
Old 09-01-2015, 01:52 PM   #2
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.1, LFS-current, NetBSD 6.1.3
Posts: 267

Rep: Reputation: 101Reputation: 101
chroot /path/of/container
passwd root


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] Running ctdb in an LXC container PeterSteele CentOS 5 08-13-2015 07:45 AM
LXC Container: sound Not working charlie101 Linux - Virtualization and Cloud 10 06-14-2015 11:16 AM
How to use Local ISO for LXC Container? sunveer Linux - Software 0 10-04-2013 04:44 AM
script to get a lxc-container like iso of current. cod_liver_0il Slackware 1 09-10-2012 11:12 AM
How to end a Linux Container (LXC) from within? Skaperen Linux - Virtualization and Cloud 0 06-14-2011 09:37 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:21 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration