- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: run time parameter in usermod
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
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
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-04-2013 07:09 PM
03-04-2013 07:09 PM
run time parameter in usermod
Hi
Is it possible to send run time paramater to below command
?
/usr/sbin/usermod -p $(perl -e"print crypt('ABcd1234','xxxxxxxx')") -F $Zuser
i have to pass run time parameter to ABcd1234
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 09:30 PM - edited 03-04-2013 09:31 PM
03-04-2013 09:30 PM - edited 03-04-2013 09:31 PM
Re: run time parameter in usermod
>Is it possible to send run time parameter to below command
You mean pass a shell variable to perl? In place of ABcd1234?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 09:41 PM
03-04-2013 09:41 PM
Re: run time parameter in usermod
Hi Dennis,
You mean pass a shell variable to perl? In place of ABcd1234?
yes.
in usermod command ,for username I have passwd Zuser,in the same way I have to pass for password.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 10:02 PM
03-04-2013 10:02 PM
Re: run time parameter in usermod
Well you can use obvious stuttering quotes:
/usr/sbin/usermod -p $(perl -e"print crypt('"$password"','xxxxxxxx')") -F $Zuser
Or you look up an exported variable in the environment.
Or pass it as an argument after the -e string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2013 11:05 PM
03-04-2013 11:05 PM
Re: run time parameter in usermod
Hi Dennis,
Can you give me an example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2013 12:38 AM
03-05-2013 12:38 AM
Re: run time parameter in usermod
>Can you give me an example.
Of which? I showed you how to use a shell variable directly.