- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Creating Home Directories without -m -d option on ...
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
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
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
тАО03-17-2008 12:56 AM
тАО03-17-2008 12:56 AM
Creating Home Directories without -m -d option on Useradd command.
#useradd -m -d /home/
But, how can a user directory be created everytime when I run useradd command without specifying -m -d option?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2008 01:22 AM
тАО03-17-2008 01:22 AM
Re: Creating Home Directories without -m -d option on Useradd command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2008 01:32 AM
тАО03-17-2008 01:32 AM
Re: Creating Home Directories without -m -d option on Useradd command.
why dont you create a custom script to perform that same?
e.g.
#useradd.sh yogeeraj
kind regards
yogeeraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2008 01:39 AM
тАО03-17-2008 01:39 AM
Re: Creating Home Directories without -m -d option on Useradd command.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2008 02:20 AM
тАО03-17-2008 02:20 AM
Re: Creating Home Directories without -m -d option on Useradd command.
#i=
#alias adduser='useradd -m -d /home/$i $i'
#adduser
#i=
#adduser
and so on.
Thanks all for your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2008 07:34 AM
тАО03-17-2008 07:34 AM
Re: Creating Home Directories without -m -d option on Useradd command.
#i=
You don't want to use alises, functions at least let you have a parm. But better to write a script:
#!/sbin/sh
# Usage: adduser ...
for user in $*; do
useradd -m -d /home/$user $user
done
If you are happy with the answers you got, please read the following about assigning points:
http://forums.itrc.hp.com/service/forums/helptips.do?#33
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-17-2008 09:52 PM
тАО03-17-2008 09:52 PM