Re: Solaris : How to create user on remote server

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

On 11/27/2009 10:43 AM, alok pandey wrote:
HI Guru's
I didn't find any reply from your side, should I assume that we can't
create user a/c (id + password) on solaris, remotely through script ?
I simply want to add a user a/c or in other word, I want to assign
password to a user ,  remotely through ssh !

You can do a useradd command via ssh without problems, but when you set
a password for a user using the "passwd" command, it is an interactive
operation and you'd need to run something like "expect" to do it.

I'm not sure about Solaris, but the Linux "useradd" command permits you
to set the password using the "-p" option.  Note that the password given
as the argument to "-p" MUST be the ENCRYPTED version of the password
(not the cleartext), and it only supports the crypt(3) (DES) encryption.
If you use MD5 or stronger passwords, then you're sorta stuck.

Have a look at the man pages for expect for some ideas on how to
automate the interactive passwd command.
- Rick Stevens, Systems Engineer                      ricks@xxxxxxxx -
- AIM/Skype: therps2        ICQ: 22643734            Yahoo: origrps2 -
-                                                                    -
-  Memory is the second thing to go, but I can't remember the first! -

Redhat-install-list mailing list
To Unsubscribe Go To ABOVE URL or send a message to:
Subject: unsubscribe

[Red Hat Kickstart]     [Fedora Users]     [Red Hat General]     [Red Hat Development]     [Samba]     [Kernel]     [Kernel Newbies]     [Hot Springs]     [Yosemite News]

Powered by Linux