Professional Web Applications Themes

passwd script solaris 8 - Sun Solaris

Kevin <kevin.baertsint-rembert.be> wrote: > Hi > I would like to create a script to assign passwords to user accounts > (currently locked out). > I've already tried several poss. I found in the groups, but none of > them work ... > Is there a simple solution to this on Sol 8, without using other > programs like expect etc ...? No. While 'usermod' and friends can be used to script changes to the account portions of a user account, they do nothing for password changes. There are only two ways I would think to do it. 1) Use 'expect' ...

  1. #1

    Default Re: passwd script solaris 8

    Kevin <kevin.baertsint-rembert.be> wrote:
    > Hi
    > I would like to create a script to assign passwords to user accounts
    > (currently locked out).
    > I've already tried several poss. I found in the groups, but none of
    > them work ...
    > Is there a simple solution to this on Sol 8, without using other
    > programs like expect etc ...?
    No. While 'usermod' and friends can be used to script changes to the
    account portions of a user account, they do nothing for password
    changes. There are only two ways I would think to do it.

    1) Use 'expect' or similiar functionality to automate 'passwd'.
    2) Write a program to modify /etc/shadow and deal with all the locking
    issues in the script.

    #2 seems easier, but there are many potential locking issues. I've
    written a number of programs that work that way, and the locking code is
    always more extensive than the password manipulation code.

    --
    Darren Dunham [email]ddunhamtaos.com[/email]
    Unix System Administrator Taos - The SysAdmin Company
    Got some Dr Pepper? San Francisco, CA bay area
    < This line left intentionally blank to confuse you. >
    Darren Dunham Guest

  2. #2

    Default Re: passwd script solaris 8

    Hm ... thought so ...

    Well, I took a leap into the unknown and installed TLC, but when I try
    to install EXPECT, I get an error: cc not found in $path.
    Ok, so I have to install the c-compiler and adjust the $path BUT will
    this (expec. changing $path!) have any influence on my other users or
    other services that are running??

    I'm running Sol8 with Sun Ray Server 2.0, using CDE for all the users
    with adjusted frontpanel etc ...

    Cheers!
    Kevin Guest

  3. #3

    Default Re: passwd script solaris 8

    Darren Dunham <ddunhamredwood.taos.com> writes:
    >#2 seems easier, but there are many potential locking issues. I've
    >written a number of programs that work that way, and the locking code is
    >always more extensive than the password manipulation code.
    On solaris don't you just have to twizzle /etc/ptmp and call lckpwdf?

    -Mike
    Mike Marshall Guest

  4. #4

    Default Re: passwd script solaris 8

    >> On solaris don't you just have to twizzle /etc/ptmp and call lckpwdf?

    Darren Dunham <ddunhamredwood.taos.com> writes:
    >Maybe. In the past I've not been convinced that all passwd modifying
    >programs will obey lckpwdf. In particular rpc.yppasswdd didn't seem to.
    vipw still uses /etc/ptmp.

    -Mike
    Mike Marshall Guest

  5. #5

    Default Re: passwd script solaris 8

    Kevin wrote:
    >Hm ... thought so ...
    >
    >Well, I took a leap into the unknown and installed TLC, but when I try
    >to install EXPECT, I get an error: cc not found in $path.
    >Ok, so I have to install the c-compiler and adjust the $path BUT will
    >this (expec. changing $path!) have any influence on my other users or
    >other services that are running??
    >
    >I'm running Sol8 with Sun Ray Server 2.0, using CDE for all the users
    >with adjusted frontpanel etc ...
    >
    >Cheers!
    >
    >
    You don't need to use source code for Expect, TKL and TK go to:
    [url]http://www.sunfreeware.com/[/url]

    and download pre-compiled packages far easier!

    Tony Fuller

    Tony Fuller Guest

Similar Threads

  1. Replies: 5
    Last Post: December 30th, 11:30 PM
  2. Net::SSH:Perl on Solaris and passwd
    By Tweetie Pooh in forum PERL Modules
    Replies: 0
    Last Post: September 28th, 10:24 PM
  3. script for passwd file
    By Rmck in forum PERL Beginners
    Replies: 2
    Last Post: December 17th, 05:22 AM
  4. Blue Screen / Recovery / Admin Passwd not Assgnd / User Passwd Assgnd
    By Terry B. in forum Windows Setup, Administration & Security
    Replies: 2
    Last Post: July 20th, 02:49 AM
  5. Replies: 0
    Last Post: July 15th, 11:28 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139