Solaris 10 create username with blank password
Clash Royale CLAN TAG#URR8PPP
up vote
-1
down vote
favorite
How to create a script that will create a new user with a blank password in Solaris 10?
solaris
add a comment |Â
up vote
-1
down vote
favorite
How to create a script that will create a new user with a blank password in Solaris 10?
solaris
3
What have you tested so far?
â Kevin Lemaire
Jan 31 at 10:45
passwd -d $user
will delete any password field from a user.
â Tim Kennedy
Feb 2 at 18:06
add a comment |Â
up vote
-1
down vote
favorite
up vote
-1
down vote
favorite
How to create a script that will create a new user with a blank password in Solaris 10?
solaris
How to create a script that will create a new user with a blank password in Solaris 10?
solaris
edited Jan 31 at 10:24
Yaron
3,19421027
3,19421027
asked Jan 31 at 10:14
user3581641
1
1
3
What have you tested so far?
â Kevin Lemaire
Jan 31 at 10:45
passwd -d $user
will delete any password field from a user.
â Tim Kennedy
Feb 2 at 18:06
add a comment |Â
3
What have you tested so far?
â Kevin Lemaire
Jan 31 at 10:45
passwd -d $user
will delete any password field from a user.
â Tim Kennedy
Feb 2 at 18:06
3
3
What have you tested so far?
â Kevin Lemaire
Jan 31 at 10:45
What have you tested so far?
â Kevin Lemaire
Jan 31 at 10:45
passwd -d $user
will delete any password field from a user.â Tim Kennedy
Feb 2 at 18:06
passwd -d $user
will delete any password field from a user.â Tim Kennedy
Feb 2 at 18:06
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
Why do you need a script to create 1 user? You can just use useradd -m username
.
If you want to create multiple users, make a file with all the usernames, lets call it usernames. Then this for
loop will be able to help you out.
for i in $( cat usernames ); do
useradd -m $i
echo "Adding user $i"
echo $i:"P@ssW0rd" | chpasswd
done
You can also use the while
loop as @Kusalananda pointed out :
while read username ;do
useradd -m $username
echo "Adding user $username"
echo $username:"P@ssW0rd" | chpasswd
done < usernames
1
What's with thecat
? Why notwhile read ... done <usernames
?
â Kusalananda
Jan 31 at 11:39
@Kusalananda, I usually use thefor
loop for these kind of things, not too familiar with thewhile
loop and with the< file
.
â Hunter.S.Thompson
Jan 31 at 11:43
Hi Gurus, my boss requirement is to create a user with blank password on Solaris 10. I want know know if you happen to have a script the will automatically create user with blank password or with standard password (P@ssW0rd). The trick is that when you create a new user the password should have no user intervention. Here is the Example. # Script.sh (username) (password)
â user3581641
Jan 31 at 12:53
When you execute passwd it will require user intervention to keyin the password 2 times. I want to have a script that will eliminate the user intervention so everytime i create a new user with default password it has no user intervention. Thanks
â user3581641
Jan 31 at 12:57
You should add that to your question then.
â Hunter.S.Thompson
Jan 31 at 12:58
 |Â
show 1 more comment
up vote
0
down vote
I don't believe there is package for it under Solaris 10 (they added it to v11), but you could use expect. It's easy to use, as well as compile. I've done this in the past on Solaris 10 for various efforts.
http://expect.sourceforge.net/
They may even have an example that will meet your needs as a few are password related.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Why do you need a script to create 1 user? You can just use useradd -m username
.
If you want to create multiple users, make a file with all the usernames, lets call it usernames. Then this for
loop will be able to help you out.
for i in $( cat usernames ); do
useradd -m $i
echo "Adding user $i"
echo $i:"P@ssW0rd" | chpasswd
done
You can also use the while
loop as @Kusalananda pointed out :
while read username ;do
useradd -m $username
echo "Adding user $username"
echo $username:"P@ssW0rd" | chpasswd
done < usernames
1
What's with thecat
? Why notwhile read ... done <usernames
?
â Kusalananda
Jan 31 at 11:39
@Kusalananda, I usually use thefor
loop for these kind of things, not too familiar with thewhile
loop and with the< file
.
â Hunter.S.Thompson
Jan 31 at 11:43
Hi Gurus, my boss requirement is to create a user with blank password on Solaris 10. I want know know if you happen to have a script the will automatically create user with blank password or with standard password (P@ssW0rd). The trick is that when you create a new user the password should have no user intervention. Here is the Example. # Script.sh (username) (password)
â user3581641
Jan 31 at 12:53
When you execute passwd it will require user intervention to keyin the password 2 times. I want to have a script that will eliminate the user intervention so everytime i create a new user with default password it has no user intervention. Thanks
â user3581641
Jan 31 at 12:57
You should add that to your question then.
â Hunter.S.Thompson
Jan 31 at 12:58
 |Â
show 1 more comment
up vote
0
down vote
Why do you need a script to create 1 user? You can just use useradd -m username
.
If you want to create multiple users, make a file with all the usernames, lets call it usernames. Then this for
loop will be able to help you out.
for i in $( cat usernames ); do
useradd -m $i
echo "Adding user $i"
echo $i:"P@ssW0rd" | chpasswd
done
You can also use the while
loop as @Kusalananda pointed out :
while read username ;do
useradd -m $username
echo "Adding user $username"
echo $username:"P@ssW0rd" | chpasswd
done < usernames
1
What's with thecat
? Why notwhile read ... done <usernames
?
â Kusalananda
Jan 31 at 11:39
@Kusalananda, I usually use thefor
loop for these kind of things, not too familiar with thewhile
loop and with the< file
.
â Hunter.S.Thompson
Jan 31 at 11:43
Hi Gurus, my boss requirement is to create a user with blank password on Solaris 10. I want know know if you happen to have a script the will automatically create user with blank password or with standard password (P@ssW0rd). The trick is that when you create a new user the password should have no user intervention. Here is the Example. # Script.sh (username) (password)
â user3581641
Jan 31 at 12:53
When you execute passwd it will require user intervention to keyin the password 2 times. I want to have a script that will eliminate the user intervention so everytime i create a new user with default password it has no user intervention. Thanks
â user3581641
Jan 31 at 12:57
You should add that to your question then.
â Hunter.S.Thompson
Jan 31 at 12:58
 |Â
show 1 more comment
up vote
0
down vote
up vote
0
down vote
Why do you need a script to create 1 user? You can just use useradd -m username
.
If you want to create multiple users, make a file with all the usernames, lets call it usernames. Then this for
loop will be able to help you out.
for i in $( cat usernames ); do
useradd -m $i
echo "Adding user $i"
echo $i:"P@ssW0rd" | chpasswd
done
You can also use the while
loop as @Kusalananda pointed out :
while read username ;do
useradd -m $username
echo "Adding user $username"
echo $username:"P@ssW0rd" | chpasswd
done < usernames
Why do you need a script to create 1 user? You can just use useradd -m username
.
If you want to create multiple users, make a file with all the usernames, lets call it usernames. Then this for
loop will be able to help you out.
for i in $( cat usernames ); do
useradd -m $i
echo "Adding user $i"
echo $i:"P@ssW0rd" | chpasswd
done
You can also use the while
loop as @Kusalananda pointed out :
while read username ;do
useradd -m $username
echo "Adding user $username"
echo $username:"P@ssW0rd" | chpasswd
done < usernames
edited Jan 31 at 13:02
answered Jan 31 at 10:51
Hunter.S.Thompson
4,50631334
4,50631334
1
What's with thecat
? Why notwhile read ... done <usernames
?
â Kusalananda
Jan 31 at 11:39
@Kusalananda, I usually use thefor
loop for these kind of things, not too familiar with thewhile
loop and with the< file
.
â Hunter.S.Thompson
Jan 31 at 11:43
Hi Gurus, my boss requirement is to create a user with blank password on Solaris 10. I want know know if you happen to have a script the will automatically create user with blank password or with standard password (P@ssW0rd). The trick is that when you create a new user the password should have no user intervention. Here is the Example. # Script.sh (username) (password)
â user3581641
Jan 31 at 12:53
When you execute passwd it will require user intervention to keyin the password 2 times. I want to have a script that will eliminate the user intervention so everytime i create a new user with default password it has no user intervention. Thanks
â user3581641
Jan 31 at 12:57
You should add that to your question then.
â Hunter.S.Thompson
Jan 31 at 12:58
 |Â
show 1 more comment
1
What's with thecat
? Why notwhile read ... done <usernames
?
â Kusalananda
Jan 31 at 11:39
@Kusalananda, I usually use thefor
loop for these kind of things, not too familiar with thewhile
loop and with the< file
.
â Hunter.S.Thompson
Jan 31 at 11:43
Hi Gurus, my boss requirement is to create a user with blank password on Solaris 10. I want know know if you happen to have a script the will automatically create user with blank password or with standard password (P@ssW0rd). The trick is that when you create a new user the password should have no user intervention. Here is the Example. # Script.sh (username) (password)
â user3581641
Jan 31 at 12:53
When you execute passwd it will require user intervention to keyin the password 2 times. I want to have a script that will eliminate the user intervention so everytime i create a new user with default password it has no user intervention. Thanks
â user3581641
Jan 31 at 12:57
You should add that to your question then.
â Hunter.S.Thompson
Jan 31 at 12:58
1
1
What's with the
cat
? Why not while read ... done <usernames
?â Kusalananda
Jan 31 at 11:39
What's with the
cat
? Why not while read ... done <usernames
?â Kusalananda
Jan 31 at 11:39
@Kusalananda, I usually use the
for
loop for these kind of things, not too familiar with the while
loop and with the < file
.â Hunter.S.Thompson
Jan 31 at 11:43
@Kusalananda, I usually use the
for
loop for these kind of things, not too familiar with the while
loop and with the < file
.â Hunter.S.Thompson
Jan 31 at 11:43
Hi Gurus, my boss requirement is to create a user with blank password on Solaris 10. I want know know if you happen to have a script the will automatically create user with blank password or with standard password (P@ssW0rd). The trick is that when you create a new user the password should have no user intervention. Here is the Example. # Script.sh (username) (password)
â user3581641
Jan 31 at 12:53
Hi Gurus, my boss requirement is to create a user with blank password on Solaris 10. I want know know if you happen to have a script the will automatically create user with blank password or with standard password (P@ssW0rd). The trick is that when you create a new user the password should have no user intervention. Here is the Example. # Script.sh (username) (password)
â user3581641
Jan 31 at 12:53
When you execute passwd it will require user intervention to keyin the password 2 times. I want to have a script that will eliminate the user intervention so everytime i create a new user with default password it has no user intervention. Thanks
â user3581641
Jan 31 at 12:57
When you execute passwd it will require user intervention to keyin the password 2 times. I want to have a script that will eliminate the user intervention so everytime i create a new user with default password it has no user intervention. Thanks
â user3581641
Jan 31 at 12:57
You should add that to your question then.
â Hunter.S.Thompson
Jan 31 at 12:58
You should add that to your question then.
â Hunter.S.Thompson
Jan 31 at 12:58
 |Â
show 1 more comment
up vote
0
down vote
I don't believe there is package for it under Solaris 10 (they added it to v11), but you could use expect. It's easy to use, as well as compile. I've done this in the past on Solaris 10 for various efforts.
http://expect.sourceforge.net/
They may even have an example that will meet your needs as a few are password related.
add a comment |Â
up vote
0
down vote
I don't believe there is package for it under Solaris 10 (they added it to v11), but you could use expect. It's easy to use, as well as compile. I've done this in the past on Solaris 10 for various efforts.
http://expect.sourceforge.net/
They may even have an example that will meet your needs as a few are password related.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
I don't believe there is package for it under Solaris 10 (they added it to v11), but you could use expect. It's easy to use, as well as compile. I've done this in the past on Solaris 10 for various efforts.
http://expect.sourceforge.net/
They may even have an example that will meet your needs as a few are password related.
I don't believe there is package for it under Solaris 10 (they added it to v11), but you could use expect. It's easy to use, as well as compile. I've done this in the past on Solaris 10 for various efforts.
http://expect.sourceforge.net/
They may even have an example that will meet your needs as a few are password related.
answered Feb 1 at 22:27
sleepyweasel
86319
86319
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f420894%2fsolaris-10-create-username-with-blank-password%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
3
What have you tested so far?
â Kevin Lemaire
Jan 31 at 10:45
passwd -d $user
will delete any password field from a user.â Tim Kennedy
Feb 2 at 18:06