- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Useradd
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 10:38 PM
02-12-2004 10:38 PM
Useradd
I want to add users, I want to write a script for this.
Idea I want in this script, I have some
Uniq
Please help, I know scripting, but not able to formulate properly.
thanks and regards
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 10:48 PM
02-12-2004 10:48 PM
Re: Useradd
read UID
echo "Enter user NAME: "
read UNAME
echo "Enter group ID: "
read GID
echo "Enter group name: "
read GNAME
groupadd -g $GID $GNAME
useradd -u $UID -o -g $GID $UNAME
-------
This is an overall logic for the script.
also you may need to check before adding the login, check for duplicate user ids.
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 10:58 PM
02-12-2004 10:58 PM
Re: Useradd
Thanks for reply Vijay,
I want something like below,
useradd -g gid -d /home/u$SSOID -s /bin/ksh -c "email, contact no" -m username
U have given good idea, can it be little more customised.
Regards
Prashant
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 11:19 PM
02-12-2004 11:19 PM
Re: Useradd
useradd
[-u uid [-o] ]
[-g group]
[-G group [, group...]]
[-d dir]
[-s shell]
[-c comment]
[-m [-k skel_dir]]
[-f inactive]
[-e expire]
login
Here, only
Hoe this helps
Vijay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2004 11:24 PM
02-12-2004 11:24 PM
Re: Useradd
useradd -u $UID -o -g $GID -d /home/$LOGIN -s $SHELL -c $COMMENT $LOGIN
thanks
vijay