HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Random generated password for new account
Operating System - HP-UX
1834601
Members
3899
Online
110069
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- 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
06-09-2003 10:29 PM
06-09-2003 10:29 PM
Hi all,
My system is a trusted system. When I create the user in SAM, it gives me the initial password more than 20 characters.
Is there any setting that can minimized the password to 8-10 characters?
Regards,
Wendy
My system is a trusted system. When I create the user in SAM, it gives me the initial password more than 20 characters.
Is there any setting that can minimized the password to 8-10 characters?
Regards,
Wendy
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2003 11:03 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2003 11:17 PM
06-09-2003 11:17 PM
Re: Random generated password for new account
edit the file
/etc/default/security
and add a line like
MIN_PASSWORD_LENGTH=8
Regards
Rainer
/etc/default/security
and add a line like
MIN_PASSWORD_LENGTH=8
Regards
Rainer
He's a real UNIX Man, sitting in his UNIX LAN making all his UNIX plans for nobody ...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-10-2003 04:35 AM
06-10-2003 04:35 AM
Re: Random generated password for new account
Or you can generate your own....here's some C code to do just that:
/* Takes a command-line arg, and generates that many random 8-char passwords */
#include
#include
#include
#include
#include
#define BAD_PASSWD_CHARS "<>&1l0O#@"
#define GOOD_NUMS "0123456789"
main(int argc, char **argv)
{
char password[9];
time_t today_t;
short rand;
int x,y,number;
if (argc < 2)
{
printf("\n Usage: randpass\n\n");
exit(1);
}
for (x = 0; x if (!index(GOOD_NUMS,argv[1][x]))
{
printf("\nInvalid number!\n\n");
exit(1);
}
number = atoi(argv[1]);
time(&today_t);
srandom(today_t);
for(y = 0; y < number; y++)
{
for (x = 0; x < 8; x++)
{
rand = 0;
while (rand < 33 || rand > 126 || index(BAD_PASSWD_CHARS,rand))
{
rand = random();
rand /= 100;
}
password[x] = rand;
}
password[8] = '\0';
printf("Password %d: %s\n",y+1,password);
}
}
/* Takes a command-line arg, and generates that many random 8-char passwords */
#include
#include
#include
#include
#include
#define BAD_PASSWD_CHARS "<>&1l0O#@"
#define GOOD_NUMS "0123456789"
main(int argc, char **argv)
{
char password[9];
time_t today_t;
short rand;
int x,y,number;
if (argc < 2)
{
printf("\n Usage: randpass
exit(1);
}
for (x = 0; x
{
printf("\nInvalid number!\n\n");
exit(1);
}
number = atoi(argv[1]);
time(&today_t);
srandom(today_t);
for(y = 0; y < number; y++)
{
for (x = 0; x < 8; x++)
{
rand = 0;
while (rand < 33 || rand > 126 || index(BAD_PASSWD_CHARS,rand))
{
rand = random();
rand /= 100;
}
password[x] = rand;
}
password[8] = '\0';
printf("Password %d: %s\n",y+1,password);
}
}
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP