nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

HP UX create or add users from command line using useradd

This is a discussion on HP UX create or add users from command line using useradd within the HP-UX forums, part of the UNIX operating systems category; My last post was about adding users from SAM GUI tool. This is about adding a user from command line ...


Go Back   nixCraft Linux Forum > UNIX operating systems > HP-UX

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 12-20-2006, 02:13 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 557
Rep Power: 6
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default HP UX create or add users from command line using useradd

My last post was about adding users from SAM GUI tool. This is about adding a user from command line tool useradd.

Create / add a user call rocky with home directory
Code:
useradd -m rocky
Setup a password for rocky
Code:
passwd rocky
Remember password must be 6 chracter long and include special character and digits for security.

Add user john to secondary group called accounting
Code:
useradd -G accounting -m john
passwd john
Final example
=> Add a user called guestuser as per following requirements
=> Primary group member of guests
=> Secondary group member of www and accounting
=> Shell must be /usr/bin/bash3
=> Home directory must be /home/guestuser

Code:
useradd -g guests -G www,accounting -d /home/guests -s /home/guestuser/ -m guestuser
passwd guestuser
Read man page for more info and options
Code:
man useradd
man passwd
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Sponsored Links
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
HPUX Unix comparing 2 large files line by line raj HP-UX 1 02-11-2008 05:20 PM
How do I configure the network card from the command line? jerry Linux software 4 09-17-2007 03:52 PM
Command line remote access angelus_kit Networking, Firewalls and Security 7 09-05-2007 06:30 PM
Create new user account in Ubuntu Linux from command line sweta Getting started tutorials 0 06-21-2007 01:49 AM
how to create multiple file in a single command selvam Shell scripting 3 07-26-2006 01:01 AM


All times are GMT +5.5. The time now is 05:00 AM.


Powered by vBulletin® Version 3.7.2 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

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