Re: [smartos-discuss] request : history lesson : why Node.js in SmartOS?

2017-11-01 Thread Mayuresh Kathe
On Wed, Nov 01, 2017 at 04:13:51PM -0700, Brian Bennett wrote:
> SmartOS is used as a base platform for Triton (née SmartDataCenter), a 
> datacenter orchestration platform. SmartDataCenter was written in js, so it 
> made sense to write many of the necessary platform utilities in js as well 
> because they either needed to work with upstack services or could share 
> libraries.
> 
> There's nothing in the Unix philosophy that dictates what language things 
> should be written in. The components written in node, do follow very well the 
> Unix philosophy.
> 
> * Write programs that do one thing and do it well.
> * Write programs to work together.
> * Write programs to handle text streams, because that is a universal 
> interface.
> 
> Node.js is quite good at fulfilling those tenets.

true, node.js (and javascript) might be good at fulfilling those tenets, but
then again, so is java. and that must be why java has been removed by almost
all "illumos" distributions from their base installs. :)
 
> Additionally, a lot of effort has been put into mdb and dtrace for debugging 
> node.js. Both of which are already used extensively by us for debugging the 
> kernel and various C programs. So writing systems utilities in js gives us 
> the same debugging workflow as C, which isn't something that can currently be 
> done with languages like python, ruby, rust, or go (go is getting better, but 
> that's only fairly recent, and still has a way to go).

there's also something simpler, it's called "jq".
and it's parentage is "sed", 'awk' and "grep", so you get the idea!

> So, there were a lot of reasons (and more than the ones I mentioned here). 
> Node.js was best suited to what we needed at the time.

true, the "first system syndrome".
but, it would be wiser to move towards the second and third systems now?

~mayuresh



---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] SmartOS on a single disk setup

2017-11-01 Thread Kevr
I thought that might be the case Brian. Thank you for clearing that up for me.

Kevin Ratcliffe

Sent from [ProtonMail](https://protonmail.ch)

>  Original Message 
> Subject: Re: [smartos-discuss] SmartOS on a single disk setup
> Local Time: 1 November 2017 11:16 PM
> UTC Time: 1 November 2017 23:16
> From: brian.benn...@joyent.com
> To: smartos-discuss@lists.smartos.org
>
> Data on disk will need to be rewritten before the second copy will be created.
>
> If a single disk with copies=2 is what you want, after the initial setup 
> there has been very little data written to the pool yet, so you can set that 
> on the pool root and it will be inherited by descendent datasets as they are 
> created.
>
> --
> Brian Bennett
> Systems Engineer, Cloud Operations
> Joyent, Inc. | www.joyent.com
>
>> On Nov 1, 2017, at 7:14 AM, Kevr  wrote:
>>
>> Hi
>>
>> I have just moved my ansible zone to a single disk, low power mini pc and 
>> installed a tftp server for pxe booting. Of course this is not fault 
>> tolerant but a backup to a usb drive once a week is suffice for my needs. As 
>> an added bit of fault tolerance I want to set copies=2 as a zfs attribute. 
>> How does this work with data that is already on disk. ie. if I set copies=2 
>> to the zones filesystem, will this create backup copies of previously 
>> written blocks? If not, would it be a sensible default for the installer on 
>> single disk systems? Not mega important I know but it's just an idea.
>>
>> Kevin Ratcliffe
>>
>> Sent from [ProtonMail](https://protonmail.ch/)


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] SmartOS on a single disk setup

2017-11-01 Thread Brian Bennett
Data on disk will need to be rewritten before the second copy will be created.

If a single disk with copies=2 is what you want, after the initial setup there 
has been very little data written to the pool yet, so you can set that on the 
pool root and it will be inherited by descendent datasets as they are created.


-- 
Brian Bennett
Systems Engineer, Cloud Operations
Joyent, Inc. | www.joyent.com 

> On Nov 1, 2017, at 7:14 AM, Kevr  wrote:
> 
> Hi
> 
> I have just moved my ansible zone to a single disk, low power mini pc and 
> installed a tftp server for pxe booting. Of course this is not fault tolerant 
> but a backup to a usb drive once a week is suffice for my needs. As an added 
> bit of fault tolerance I want to set copies=2 as a zfs attribute. How does 
> this work with data that is already on disk. ie. if I set copies=2 to the 
> zones filesystem, will this create backup copies of previously written 
> blocks? If not, would it be a sensible default for the installer on single 
> disk systems? Not mega important I know but it's just an idea.
> 
> Kevin Ratcliffe
> 
> Sent from ProtonMail 
> 
> 
> smartos-discuss | Archives 
>   
>  | 
> Modify  Your Subscription   
> 


smime.p7s
Description: S/MIME cryptographic signature




---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] request : history lesson : why Node.js in SmartOS?

2017-11-01 Thread Brian Bennett
SmartOS is used as a base platform for Triton (née SmartDataCenter), a 
datacenter orchestration platform. SmartDataCenter was written in js, so it 
made sense to write many of the necessary platform utilities in js as well 
because they either needed to work with upstack services or could share 
libraries.

There's nothing in the Unix philosophy that dictates what language things 
should be written in. The components written in node, do follow very well the 
Unix philosophy.

* Write programs that do one thing and do it well.
* Write programs to work together.
* Write programs to handle text streams, because that is a universal interface.

Node.js is quite good at fulfilling those tenets.

Additionally, a lot of effort has been put into mdb and dtrace for debugging 
node.js. Both of which are already used extensively by us for debugging the 
kernel and various C programs. So writing systems utilities in js gives us the 
same debugging workflow as C, which isn't something that can currently be done 
with languages like python, ruby, rust, or go (go is getting better, but that's 
only fairly recent, and still has a way to go).

So, there were a lot of reasons (and more than the ones I mentioned here). 
Node.js was best suited to what we needed at the time.

-- 
Brian Bennett
Systems Engineer, Cloud Operations
Joyent, Inc. | www.joyent.com 

> On Oct 30, 2017, at 6:59 PM, Mayuresh Kathe  wrote:
> 
> On Mon, Oct 30, 2017 at 12:07:18PM -0700, Joshua M. Clulow wrote:
>> On 30 October 2017 at 11:42, Mayuresh Kathe  wrote:
>>> I have been wondering as to what be the purpose of having Node.js in
>>> SmartOS.
>>> I believe it's been there right from the very beginning.
>>> May I get to know more about it?
>> 
>> We have built a lot of tools using Node, some of which ship in the
>> SmartOS platform image.  The copy of "node" in the platform is shipped
>> as part of those tools.
> 
> Yes, I noticed that, and then digging up on various notes on the web led
> me to notice that "node" in a way is quite well integrated with SmartOS.
> 
> What I wanted to know is why was "node" chosen in the first place.
> No belittling anyone's intelligence, but, wouldn't the standard UNIX tools
> used while adhering to the UNIX philosophy have been good enough?
> 
> While pondering this, I also thought that JSON might be the key reason.
> Am I right?
> 
> Thanks,
> 
> ~Mayuresh
> 


smime.p7s
Description: S/MIME cryptographic signature




---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] SmartOS Zone connect to FreeIPA

2017-11-01 Thread Stefan Eestermans

Hello

I've been fighting with FreeIPA and SmartOS for while now and had this 
sorted out. It's just that there is no sssd for SmartOS and hence it 
doesn't work out of the box.


Normally, it shouldn't be to hard to get it working once you have the 
ldap client on SmartOS connected to the FreeIPA directory server.  I'll 
paste here below a recent post of my new blog 
(https://blog.soholabs.org), dedicated to SmartOS and related 
technologies as a lab environment.


So, if I understood the situation well: the SmartOS LDAP client is up 
and running and is communicating with the FreeIPA directory server, but 
ssh doesn't seem to take into account the public keys that are stored in 
the directory server.


In order to facilitate this, you have to make sure that the ssh daemon 
is able to obtain these keys from the directory server. In comparison, 
the two lines of importance in the /etc/ssh/sshd_config file on a CentOS 
FreeIPA client installation are:


    AuthorizedKeysCommand /usr/bin/sss_ssh_authorizedkeys
    AuthorizedKeysCommandUser nobody

The AuthorizedKeysCommand parameter refers to the command that obtains 
the public keys from the directory server. Unfortunately there is no 
equivalent binary on SmartOS because it lacks the sssd software on the 
client side.


Luckily, it is not much of an issue because it is rather easy for an 
LDAP client to obtain this information from the directory server. While 
there are certainly a variety of solutions available on the Internet, at 
first sight I found them often too sophisticated for what I needed. So, 
I decided to limit the solution to a bash script file that encapsulates 
a ldapsearch command which will fetch the public keys from the directory 
server.


These few lines here below are enough to fetch the keys and to make sed 
print only the information needed: the user's public keys.


::
/opt/local/bin/ssh-ldap-pubkey-wrapper.sh
::
#!/bin/bash

/opt/local/bin/ldapsearch -LLL -x -u \
-o ldif-wrap=no \
-h ipaserver.example.com \
-D "uid=solaris,cn=sysaccounts,cn=etc,dc=example,dc=com" \
-w "strongPassword" \
-b "dc=example,dc=com" \
'(&(objectClass=posixAccount)(uid='"$1"'))' \
ipaSshPubKey | sed -n 's/^[ \t]*ipaSshPubKey:[ \t]*\(.*\)/\1/p'

We use the uid=solaris,cn=sysaccounts,cn=etc account with the 
strongPassword (literally) to avoid that we have to expose any user 
account's credentials in the script file.


This script takes one argument, which is the "user" who makes the ssh 
login. As we will see later on, the sshd_config file allows to refer to 
the user via %u. Make sure the script has the execution bits set and 
give it a try with a user name defined in the directory server. This 
command should list the public keys of user1:


/opt/local/bin/ssh-ldap-pubkey-wrapper.sh  user1

Once the script provides the public keys as expected, we can integrate 
it in the sshd_config file. Find the line with AuthorizedKeysCommand or 
add following lines to /etc/ssh/sshd_config:


AuthorizedKeysCommand /opt/local/bin/ssh-ldap-pubkey-wrapper.sh %u
AuthorizedKeysCommandUser nobody

To take this configuration change into account we have to restart the 
ssh daemon with the command:


sudo svcadm restart ssh

While making the first connection attempts via ssh, it might be valuable 
to keep an eye on the log file on the ssh target system for more 
information in case of connection failures.


sudo tail -f /var/log/authlog

Make sure the user has its home directory available on the target 
system. That's all it takes to ssh login without password and without 
any local ~/.ssh/authorized_keys file.


Beware, locally provided public keys in ~/.ssh/authorized_keys will 
still allow the user to ssh-login. This procedure is facilitating 
ssh-login based on public keys stored in the directory server, but it is 
not limiting access to these public keys. Other sshd_config changes are 
needed to enforce this.


kind regards

Stefan


On 03/10/17 06:06, Shridhar Daithankar wrote:

On Monday 2 October 2017 11:57:34 AM IST Joven Sabanal wrote:

​Hi,

I'm trying to connect SmartOS Zone VM on FreeIPA but I cannot get it work.
I use this link as reference.

https://www.redhat.com/archives/freeipa-users/2014-April/msg00128.html

I follow on what's indicated on the link. I only register the Zone VM to
FreeIPA domain. I can see also that the VM is connection to the domain by
running "ldaplist".

Problem now is when I try to login using SSH and use the user that I
created on FreeIPA, it cannot login.

Anyone did try the same setup as mine?

Appreciate any advice and recommendation. Thanks in advanced.

Adding a me too here. I can join lxc containers to AD domain using sssd(realm
join etc.) in a jiffy but SmartOS lx branded zones are unable to join the AD.

I could threw in the hand-made kerberos authentication configuration and
create the users by hand, so not much was lost. but sssd definitely didn't
work and I couldn't spend much time investigating it 

RE: [smartos-discuss] Build fails with [0-illumos-stamp] Error 1.

2017-11-01 Thread a b
~/smartos-live/illumos/projects/log/ is empty.

running find ~/smartos-live -depth -type f -name "mail_msg*" -print

produces nothing.

Last build I did was 20170312T152600Z. I'm running on 20150625T055522Z. Could 
that be the problem?
--
Empathy is still a core engineering value.

From: Joshua M. Clulow [j...@sysmgr.org]
Sent: Wednesday, November 1, 2017 22:16
To: smartos-discuss@lists.smartos.org
Subject: Re: [smartos-discuss] Build fails with [0-illumos-stamp] Error 1.

On 1 November 2017 at 14:15, Joshua M. Clulow  wrote:
> I would start by checking to see if there is a "mail_msg" and
> "nightly.log" for the illumos build.  They should be in
> "projects/illumos/log/log.-MM-HH.MM:SS/".
 
 ... OK, that date format is not quite right (my apologies) but you get the 
idea!
 
 --
 Joshua M. Clulow
 Engineer @ Joyent
 http://blog.sysmgr.org
 


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


RE: [smartos-discuss] request : history lesson : why Node.js in SmartOS?

2017-11-01 Thread a b
 The way I understood it (and Bryan can correct me  if  I  got  it
 wrong, I know he still reads this mailing list), node ended up in
 SmartOS because of Fishworks.
 
 Fishworks was a skunkworks project to develop a storage appliance
 at  Sun  Microsystems.  To  develop  the  front  end,  Bryan used
 JavaScript.  This  appears  to  have  been   the   beginning   of
 infatuation with JavaScript and my hypothesis is that this is the
 reason why node.js ended up in SmartOS.
 
 What was the code name again? Wasabi?
 --
 Empathy is still a core engineering value.
 
 From: Mayuresh Kathe [mayur...@kathe.in]
 Sent: Monday, October 30, 2017 19:42
 To: smartos-discuss@lists.smartos.org
 Subject: [smartos-discuss] request : history lesson : why Node.js in SmartOS?
 
 Hi,
 
 I have been wondering as to what be the purpose of having Node.js in
 SmartOS.
 I believe it's been there right from the very beginning.
 May I get to know more about it?
 
 Thanks,
 
 ~Mayuresh
 


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] Build fails with [0-illumos-stamp] Error 1.

2017-11-01 Thread Joshua M. Clulow
On 1 November 2017 at 14:15, Joshua M. Clulow  wrote:
> I would start by checking to see if there is a "mail_msg" and
> "nightly.log" for the illumos build.  They should be in
> "projects/illumos/log/log.-MM-HH.MM:SS/".

... OK, that date format is not quite right (my apologies) but you get the idea!

-- 
Joshua M. Clulow
Engineer @ Joyent
http://blog.sysmgr.org


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] Build fails with [0-illumos-stamp] Error 1.

2017-11-01 Thread Joshua M. Clulow
On 1 November 2017 at 14:12, a b  wrote:
> the build process consistently fails thus:
>
> The following command caused the error:
> cd tools; pwd; /export/home/buildusr/smartos-live/proto.strap/usr/bin/dmake 
> install
> make: Fatal error: Command failed for target `bldtools'
> Current working directory 
> /export/home/buildusr/smartos-live/projects/illumos/usr/src
> Makefile:292: recipe for target '0-illumos-stamp' failed
> gmake: *** [0-illumos-stamp] Error 1
>
> anybody else seeing this? If not, what's a good  place  to  start
> debugging for this particular error?

I would start by checking to see if there is a "mail_msg" and
"nightly.log" for the illumos build.  They should be in
"projects/illumos/log/log.-MM-HH.MM:SS/".


Cheers.

-- 
Joshua M. Clulow
Engineer @ Joyent
http://blog.sysmgr.org


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


[smartos-discuss] Build fails with [0-illumos-stamp] Error 1.

2017-11-01 Thread a b
Since it's been a while since I did a build, figuring there'd  be
flag  days, I removed my entire smartos-live directory, performed
a clone as per instructions in the wiki, verified that  e69a0918-
055d-11e5-8912-e3ceb6df4cf8  is still the correct image ID to use
and kicked off

cp {sample.,}configure.smartos && ./configure && gmake live && gmake usb

Build type   is  non-DEBUG
RELEASE  is 
VERSION  is joyent_20171029T184408Z
RELEASE_DATE is November 2017

the build process consistently fails thus:

The following command caused the error:
cd tools; pwd; /export/home/buildusr/smartos-live/proto.strap/usr/bin/dmake 
install
make: Fatal error: Command failed for target `bldtools'
Current working directory 
/export/home/buildusr/smartos-live/projects/illumos/usr/src
Makefile:292: recipe for target '0-illumos-stamp' failed
gmake: *** [0-illumos-stamp] Error 1

anybody else seeing this? If not, what's a good  place  to  start
debugging for this particular error?
--
Empathy is still a core engineering value.

---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


[smartos-discuss] SmartOS in Linux KVM

2017-11-01 Thread Marc Phillips

I trying to work out some things in SmartOS and am trying to run it inside 
Linux KVM.
The Global Zone installs just fine, but it cores whenever I try to import an 
image with imgadm.

I know this is sorta pointing mirrors back onto themselves running a hypervisor 
inside a hypervisor,
but was curious if anyone had insight on making this work.  The cores appear 
(to me) to be FS related.
I'm not familiar enough to debug a smartOS core, but in the stuff painted on 
the screen into the console
it looks FS related.  The underlying disks are ext4.

This could just be my system, but wanted to check if there are any tricks 
others have noticed in doing 
something similar.  

R. Marc


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] adding xserver to smartos?

2017-11-01 Thread Lonnie Cumberland
Hi Jan,

I started working on this a bit more today after spending a bit of time
reviewing the SmartOS docs to get a better feel for things but have a
couple of questions (in-line)

X server environment can be installed using pkgsrc. But in SmartOS, you are
> very limited. You can make it running but expecting even a working web
> browser is a bit daring. Here is what you need to do:
>

Mostly, I just want to startup a VNC or Spice client and try to connect to
a running zone with maybe a simple linux VM running, perhaps.


> - bootstrap pkgsrc into the global zone
>
For this part, do you mean to install pkgin as I did this by following:

https://wiki.smartos.org/pages/viewpage.action?pageId=756297

and:

Install pkgin

From http://wiki.smartos.org/display/DOC/Installing+pkgin

This is the SmartOS package manager you will find the latest version at
http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/ in this case its
bootstrap-2013Q2-x86_64.tar.gz

cd /
curl -k
http://pkgsrc.joyent.com/packages/SmartOS/bootstrap/bootstrap-2013Q2-x86_64.tar.gz
| gzcat | tar -xf -
pkg_admin rebuild
pkgin -y up
--

For the next part, I want to install everything in a zone, if possible, and
am looking at:

From https://gist.github.com/3050224

From
http://wiki.smartos.org/display/DOC/How+to+create+a+zone+%28+OS+virtualized+machine+%29+in+SmartOS


imgadm update
imgadm avail | grep base64
# copy the UUID "9eac5c0c-a941-11e2-a7dc-57a6b041988f" from the latest
version (look at the date)
# Note there exist a node image too, but its always outdated and it
contains software that you most likely don't need

imgadm import 9eac5c0c-a941-11e2-a7dc-57a6b041988f
# you should also see a ASCII progress bar. If instead you see:
#   60a3b1fa-0674-11e2-abf5-cb82934a8e24 doesnt exist. continuing with
install
# you are mostlikely running an older SmartOS version, don't worry it is
downloading it just dosn't show any progress

# /zones/ is the permanent directory if you store something elsewhere it
will be deleted when SmartOS power off.
mkdir /zones/defs
touch /zones/defs/base.json

# dataset_uuid: the copied UUD
# nics[0].ip: In smartos I typed `ifconfig -a` and found `e1000g0`
(172.16.136.129).
#   so for the SmartMashine I use `172.16.136.100` (I just picked 100
randomly)
# nics[0].gateway, resolvers[0]: I typed `netstat -r` and find the default
gateway value (172.16.136.2).
# ram: My VM of smartos is given 1024 so I give my SmartMachine 512

echo '
{
  "brand": "joyent",
  "ram": 512,
  "autoboot": false,
  "dataset_uuid": "9eac5c0c-a941-11e2-a7dc-57a6b041988f",
  "resolvers": [
"172.16.136.2",
"8.8.8.8"
  ],
  "nics": [
{
  "nic_tag": "admin",
  "ip": "172.16.136.100",
  "netmask": "255.255.255.0",
  "gateway": "172.16.136.2"
 }
  ]
}' > /zones/defs/base.json

vmadm create -f /zones/defs/base.json

Of course, I will be chaning the IP, gateway, etc.., then start the VM and
zlogin:

vmadm list
# output:
# UUID  TYPE  RAM  STATE
 ALIAS
# 463647dc-57f8-45ac-bdc2-18b0cc4c0be6  OS512  running   -
# copy the UUID

vmadm start 463647dc-57f8-45ac-bdc2-18b0cc4c0be6
zlogin 463647dc-57f8-45ac-bdc2-18b0cc4c0be6

- basic X org:
> pkgin install modular-xorg-server xf86-video-vesa xf86-input-keyboard
> xf86-input-mouse xhost xauth dejavu-ttf xinit
>

I think that this will need to be done after creating the unprivileged user
in the next step below, right.
-


> - create an unprivileged user (make sure the user and homedir persist
> after reboot)
>

This part is a bit confusing and all that I could find on this process is,
of course will change the user name:

https://docs.joyent.com/sdc6/managing-customers

User Accounts on SmartMachines

The SmartMachine owner can create user accounts by logging in to the
SmartMachine as root and using the useradd tool. This command creates a
user account for the user jill:

[root@smartos ~]# useradd -d /home/jill -m -c "Jill Joyent" jill
By default, new user accounts are locked. Mark the user account as "no
login" to unlock it. This means that the user cannot log in to the user
account with a password. She will be able to log in to the user account
using SmartLogin. Use the passwd command like this to mark the account "no
login":

[root@smartos ~]# passwd -N jill
passwd: password information changed for jill
You will need to store the users public key in her ~/.ssh/authorized_keys
file.

Another option is to use the passwd command to give the user account a
password:

[root@smartos ~]# passwd jill
New Password:
Re-enter new Password:
passwd: password successfully changed for jill
One reason you may want to give a user account a password even though
password logins are disabled is to allow her to use sudo. If you want to
enable password logins, you can do so in /etc/ssh/sshd_config.

--

If 

[smartos-discuss] SmartOS on a single disk setup

2017-11-01 Thread Kevr
Hi

I have just moved my ansible zone to a single disk, low power mini pc and 
installed a tftp server for pxe booting. Of course this is not fault tolerant 
but a backup to a usb drive once a week is suffice for my needs. As an added 
bit of fault tolerance I want to set copies=2 as a zfs attribute. How does this 
work with data that is already on disk. ie. if I set copies=2 to the zones 
filesystem, will this create backup copies of previously written blocks? If 
not, would it be a sensible default for the installer on single disk systems? 
Not mega important I know but it's just an idea.

Kevin Ratcliffe

Sent from [ProtonMail](https://protonmail.ch)


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] Can a delegated dataset be removed from a zone

2017-11-01 Thread Kevr
remove dataset from zonecfg did the trick. Thanks for all your help.

Kevin Ratcliffe

Sent from [ProtonMail](https://protonmail.ch)

>  Original Message 
> Subject: Re: [smartos-discuss] Can a delegated dataset be removed from a zone
> Local Time: 1 November 2017 12:54 PM
> UTC Time: 1 November 2017 12:54
> From: gjermundpri...@gmail.com
> To: smartos-discuss@lists.smartos.org
>
> In that case I would generate a new zone, and rsync or scp the files in 
> question from the old zone to the new one. Then do the zfs send | scp | zfs 
> receive
>
> G
>
> On 1 Nov, 2017, at 13:49, Kevr  wrote:
>
>> I messed up! I was doing a vmadm send but soon realized that it fails with 
>> delegated datesets. So I sent the dataset to a file as a backup, destroyed 
>> the delegated dataset with zfs destroy from the gz and it still fails to 
>> send. I removed the zone from the receiving side, made sure that the 
>> filesystems were gone too. Tried the process again but vmadm send still 
>> complains about not all datasets received. So I assume that the problem 
>> comes from the zone definition.
>>
>> Kevin Ratcliffe
>>
>> Sent from [ProtonMail](https://protonmail.ch/)
>>
>>>  Original Message 
>>> Subject: Re: [smartos-discuss] Can a delegated dataset be removed from a 
>>> zone
>>> Local Time: 1 November 2017 12:41 PM
>>> UTC Time: 1 November 2017 12:41
>>> From: gjermundpri...@gmail.com
>>> To: smartos-discuss@lists.smartos.org
>>>
>>> Please be clear.
>>>
>>> What are you trying to achieve?
>>>
>>> Would you just like to remove the delegate entry?
>>> Or would you like to remove the dataset as well?
>>>
>>> For me I would just generate a new zone the way I would like it.
>>>
>>> G
>>>
>>> On 1 Nov, 2017, at 13:38, Kevr  wrote:
>>>
 Hi

 Can anybody please give an example of how to remove a delegated dataset 
 from a zone?

 Thanks in advance for any help.

 Kevin Ratcliffe

 Sent from [ProtonMail](https://protonmail.ch/)
>
> smartos-discuss | 
> [Archives](https://www.listbox.com/member/archive/184463/=now) [RSS feed for 
> smartos-discuss](https://www.listbox.com/member/archive/rss/184463/25291397-002539d9)
>  | [Modify](https://www.listbox.com/member/?;) Your Subscription
> [Powered by Listbox](http://www.listbox.com)


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] Can a delegated dataset be removed from a zone

2017-11-01 Thread Gjermund Gusland Thorsen
In that case I would generate a new zone, and rsync or scp the files in 
question from the old zone to the new one. Then do the zfs send | scp | zfs 
receive

G

On 1 Nov, 2017, at 13:49, Kevr  wrote:

> I messed up! I was doing a vmadm send but soon realized that it fails with 
> delegated datesets. So I sent the dataset to a file as a backup, destroyed 
> the delegated dataset with zfs destroy from the gz and it still fails to 
> send. I removed the zone from the receiving side, made sure that the 
> filesystems were gone too. Tried the process again but vmadm send still 
> complains about not all datasets received. So I assume that the problem comes 
> from the zone definition.
> 
> Kevin Ratcliffe
> 
> Sent from ProtonMail
> 
> 
>>  Original Message 
>> Subject: Re: [smartos-discuss] Can a delegated dataset be removed from a zone
>> Local Time: 1 November 2017 12:41 PM
>> UTC Time: 1 November 2017 12:41
>> From: gjermundpri...@gmail.com
>> To: smartos-discuss@lists.smartos.org
>> 
>> Please be clear.
>> 
>> What are you trying to achieve?
>> 
>> Would you just like to remove the delegate entry?
>> Or would you like to remove the dataset as well?
>> 
>> For me I would just generate a new zone the way I would like it.
>> 
>> G
>> 
>> On 1 Nov, 2017, at 13:38, Kevr  wrote:
>> 
>>> Hi
>>> 
>>> Can anybody please give an example of how to remove a delegated dataset 
>>> from a zone?
>>> 
>>> Thanks in advance for any help.
>>> 
>>> Kevin Ratcliffe
>>> 
>>> Sent from ProtonMail
>>> 
>>> 
> 
> smartos-discuss | Archives  | Modify Your Subscription 




---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] Can a delegated dataset be removed from a zone

2017-11-01 Thread Kevr
I messed up! I was doing a vmadm send but soon realized that it fails with 
delegated datesets. So I sent the dataset to a file as a backup, destroyed the 
delegated dataset with zfs destroy from the gz and it still fails to send. I 
removed the zone from the receiving side, made sure that the filesystems were 
gone too. Tried the process again but vmadm send still complains about not all 
datasets received. So I assume that the problem comes from the zone definition.

Kevin Ratcliffe

Sent from [ProtonMail](https://protonmail.ch)

>  Original Message 
> Subject: Re: [smartos-discuss] Can a delegated dataset be removed from a zone
> Local Time: 1 November 2017 12:41 PM
> UTC Time: 1 November 2017 12:41
> From: gjermundpri...@gmail.com
> To: smartos-discuss@lists.smartos.org
>
> Please be clear.
>
> What are you trying to achieve?
>
> Would you just like to remove the delegate entry?
> Or would you like to remove the dataset as well?
>
> For me I would just generate a new zone the way I would like it.
>
> G
>
> On 1 Nov, 2017, at 13:38, Kevr  wrote:
>
>> Hi
>>
>> Can anybody please give an example of how to remove a delegated dataset from 
>> a zone?
>>
>> Thanks in advance for any help.
>>
>> Kevin Ratcliffe
>>
>> Sent from [ProtonMail](https://protonmail.ch/)
>
> smartos-discuss | 
> [Archives](https://www.listbox.com/member/archive/184463/=now) [RSS feed for 
> smartos-discuss](https://www.listbox.com/member/archive/rss/184463/25291397-002539d9)
>  | [Modify](https://www.listbox.com/member/?;) Your Subscription
> [Powered by Listbox](http://www.listbox.com)


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] Can a delegated dataset be removed from a zone

2017-11-01 Thread Gjermund Gusland Thorsen
Please be clear.

What are you trying to achieve?

Would you just like to remove the delegate entry?
Or would you like to remove the dataset as well?

For me I would just generate a new zone the way I would like it.

G

On 1 Nov, 2017, at 13:38, Kevr  wrote:

> Hi
> 
> Can anybody please give an example of how to remove a delegated dataset from 
> a zone?
> 
> Thanks in advance for any help.
> 
> Kevin Ratcliffe
> 
> Sent from ProtonMail
> 
> 
> smartos-discuss | Archives  | Modify Your Subscription 




---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


Re: [smartos-discuss] Can a delegated dataset be removed from a zone

2017-11-01 Thread Jorge Schrauwen
Hi Kevin, 

You should be able to remove it using zonecfg -z uuid 

Be sure the zone is not running when you do this, I'm not near a
computer at the moment so I can't give a proper example. 

But man zonecfg should get you there. 

Regards 

Jorge

On 2017-11-01 13:38, Kevr wrote:

> Hi 
> 
> Can anybody please give an example of how to remove a delegated dataset from 
> a zone? 
> 
> Thanks in advance for any help. 
> 
> Kevin Ratcliffe 
> 
> Sent from ProtonMail [1] 
> 
> SMARTOS-DISCUSS | Archives [2] [3] | Modify [4] Your Subscription
> [5]
 

Links:
--
[1] https://protonmail.ch
[2] https://www.listbox.com/member/archive/184463/=now
[3] https://www.listbox.com/member/archive/rss/184463/26452851-88b650c7
[4]
https://www.listbox.com/member/?;
[5] http://www.listbox.com


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com


[smartos-discuss] Can a delegated dataset be removed from a zone

2017-11-01 Thread Kevr
Hi

Can anybody please give an example of how to remove a delegated dataset from a 
zone?

Thanks in advance for any help.

Kevin Ratcliffe

Sent from [ProtonMail](https://protonmail.ch)


---
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com