Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: expect and adduser

by marvell (Pilgrim)
on Oct 14, 2005 at 11:33 UTC ( [id://500205]=note: print w/replies, xml ) Need Help??


in reply to Re: expect and adduser
in thread expect and adduser

I have to use adduser becuase of the --firstuid option

--
Steve Marvell

Replies are listed 'Best First'.
Re^3: expect and adduser
by merlyn (Sage) on Oct 14, 2005 at 11:39 UTC
    But that's just a math problem. Long before we had all these fancy interactive user adding gadgets, I was writing automated tools to add users (with no interaction) in Perl version 3(!).

    I find it odd that you're trying to take a tool that was meant to be more handholding and interactive and make it less interactive. {grin}

    -- Randal L. Schwartz, Perl hacker
    Be sure to read my standard disclaimer if this is a reply.

Re^3: expect and adduser
by Perl Mouse (Chaplain) on Oct 14, 2005 at 12:15 UTC
    On my system, adduser is just a symlink to useradd. And it doesn't have a firstuid option. However, if no uid is supplied on the command line, it picks the first available uid above 99, and above any other user.

    If I were to write such a tool (and I've done so in the past), I'd just open /etc/passwd and /etc/shadow for append (if needed /etc/group as well) and write the necessary lines. But that's just me. Or I use useradd/adduser to setup everything, but the password, and require the user to visit my office and type in his/her password.

    Perl --((8:>*

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://500205]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (4)
As of 2024-03-29 12:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found