![]() |
|
|
|
|||
|
A couple of years ago I got tired of the interactive adduser(8) to create the the couple of user accounts, which I always use on OpenBSD.
The following, part of an install.site script, now automatically takes care of this. Code:
#!/bin/sh
# ----------------------------------------------------
echo ADDING USERS
DEBUG=''
#DEBUG=echo
#---------------------------
create_user() {
local NAME PASSWORD UID
NAME="$1"
UID="$2"
PASSWORD="$3"
echo Creating user: ${NAME}
$DEBUG useradd \
-m \
-g ${NAME} \
-G wheel,operator \
-k /etc/skel \
-d /home/${NAME} \
-s /bin/ksh \
-L staff \
-p ${PASSWORD} \
-u ${UID} \
-g =uid \
${NAME}
}
# password created with : $ echo MySecretPassword | encrypt -b8
# or : $ encrypt -b8 -p
create_user j65nko 1001 '$2a$08$vY3HJJAJhzAZ6yTbVxK5U.71cGBwDB6B4J/bwHmUNaa.laozj1yai'
create_user robert 1002 '$2a$08$AU69JhvTJf1/KxFBl/7ZM.8pg.SN.Z1Hx8uh1uRE2j1oWht4XqjOK'
create_user john 1003 '$2a$08$s8aW6AbI1Z8D5o0SVKODA.JySV70MuQYZm9oSGua0MLz0V7Qw9eDe'
create_user snap 1004 '$2a$08$YyNR1QBLxsEupg0MZqhWtuNbjC4hr0fiZ5pN6dwxePmUi4xVRCFNi'
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
|
All your guides are very good !
Why do not try to write a small guide with this following content ? Table of Contents Upcoming Changes in OpenBSD 4.6 Post-Installation Tasks Time & Date Installing Software User Management System Diagnostics Backup & Restore System Management Networking Updating and Upgrading Scripting It would be very useful for beginners OpenBSD Admin... Thank's |
|
|||
|
Thanks for the friendly words and encouragement.
But with the broad range of subjects you mention, it will not be a small guide, but a book. Just have some patience, there are still quite a lot of guides in my pipeline.
__________________
You don't need to be a genius to debug a pf.conf firewall ruleset, you just need the guts to run tcpdump |
|
|||
|
Quote:
I have the feeling It will be a good one (hopefully there is a pocket version). The book can become a competitor/successor of BSD-Hacks or OpenBSD-Security. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HOWTO: mounting an USB device as normal non-root user in OpenBSD | J65nko | Guides | 4 | 24th December 2008 12:43 AM |
| How to Run K3B with normal user openBSD 4.4 | mfaridi | OpenBSD General | 6 | 12th November 2008 09:25 PM |
| Create a script to rmove oldest files | disco | Programming | 5 | 14th July 2008 09:25 PM |
| Tried to create new partition using sysinstall but change is not permanent | disappearedng | FreeBSD General | 7 | 6th July 2008 10:00 PM |
| Customizeable FTP auto-fetch script (OpenBSD snapshot download as example) | J65nko | Guides | 2 | 1st June 2008 03:29 AM |