- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Create new user
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
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
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
тАО07-12-2005 07:53 AM
тАО07-12-2005 07:53 AM
Create new user
Can anyone please tell me how to create a new user, assign a home directory for the user and create a login, password for the user.
Is there any scripts available which would do this job.
Thanks,
Pat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2005 07:56 AM
тАО07-12-2005 07:56 AM
Re: Create new user
Th easiest way is to use SAM, unless you want to do it from the command line using the useradd command
Good Luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2005 07:59 AM
тАО07-12-2005 07:59 AM
Re: Create new user
SAM will guide you for a user creation with all the options you can select.
from command line you can use useradd with switch -u for UID, -g for GID , -d for home directory, -s for shell etc.
For more options look man useradd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2005 04:58 PM
тАО07-12-2005 04:58 PM
Re: Create new user
SAM is the easiest tool to create new user and set its environment
Regards
Mahesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2005 05:21 PM
тАО07-12-2005 05:21 PM
Re: Create new user
i am using such a kind of syntax and upto now
never faced a problem;
useradd -u $(expr $(cat /etc/passwd|cut -d ':' -f3|sort -n|tail -1) + 1) -g groupname -d/homedir/loginname -s/usr/bin/sh -c"username,deptname" -m
loginname
let's say;
username:Ted Brown
Dept:Finance
loginname:ut0tb (convention what you want)
group:fnc (from /etc/group which you want add user)
so my syntax must be;
useradd -u $(expr $(cat /etc/passwd|cut -d ':' -f3|sort -n|tail -1) + 1) -g fnc -d/homedir/ut0tb -s/usr/bin/sh -c"Ted Brown,Finance" -m ut0tb
My syntax goes to last id and increase 1
and get new id for my new user(ut0tb)...so this means
let's say My last user id is 878 for user
XYX then My new user Ted Brown(ut0tb) got
879 automatically.
-g means groupname
-d dir (path for the users homedir)
-s users running shell
-c comments(username,surname,dept,Pbx,etc)
-m creates the home directory if not exist...
Good Luck,
i think deserved the points!
:-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2005 06:02 PM
тАО07-12-2005 06:02 PM
Re: Create new user
you can create user in two ways one is executing commands in command line and another is using SAM .
before creating a new user , you should know all details
Logon name :
user id :
gorup id :
home directory
shell....
------------xxxxxxxxxxxxxxxx------------------
syntax :
# useradd -u
---------xxxxxxxxxxxxxxxxxx---------------
example :
# useradd -u 100 -g test -d /home/test test
here in the above example the logon name is : test , userid is :100 , group id is : test , home directory is : /home/test.
----------xxxxxxxxxxxxxxxxxxx--------------
if you are executing in command prompt then you have to create the home directory manually and after creating user , execute passwd command to assign the password for the user....
....or else
if you are using SAM then make sure....create home directory option is checked...and it will ask for password option , where you can issue the password....
now check with the new user's logon id : u will be able to logon to the system
regds
Venkatesan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2005 11:00 PM
тАО07-12-2005 11:00 PM
Re: Create new user
You can use use SAM to do it in better way. When you use sam for adding a user it gives you a option for selecting whether you want to creat a home directory or not and while creating a user it allows you to set the passwd too.
If you want to create a user through command promt so you can use useradd command with -m option to create a home directory for the use and can use passwd command to set the passwd for that user.
Regards,
Manoj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-12-2005 11:45 PM
тАО07-12-2005 11:45 PM
Re: Create new user
by SAM you will do it.
Otherwise I usually use two quick commands (pippo is a new user for example):
1.
useradd -m pippo
2.
passwd pippo
-m option on useradd command creates an home directory following contents of /etc/skel.
Hope this helps you.
Please don't forget to assign points. Thanks for that!
Best regards,
Fabio
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2005 02:21 PM
тАО07-13-2005 02:21 PM
Re: Create new user
useradd -g
You can put the -u
Cheers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-13-2005 02:37 PM
тАО07-13-2005 02:37 PM
Re: Create new user
standard command I use:
useradd -g
hth