Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
939 views

How to set a password for all users (Bash Linux)

how do I set a single password for all users in a Linux system? For example, how will I set a password, x, so that it's the password of all users in the system? I was thinking of a for loop that ...
Vince G's user avatar
  • 25
-1 votes
1 answer
566 views

"echo password | sudo -S" with exclamation mark

What I want to do is $ echo password!p | sudo -S [command] in a linux terminal (in my case, ubuntu20.04). If you type it as it is, the exclamation mark will refer to the history of the command line, ...
Saga873's user avatar
0 votes
1 answer
2k views

Bash Password validator

I have stuck with my bash code. and needed some help. I trying to write bash code that : Length – minimum of 10 characters. Contain both alphabet and number. Include both the small and capital case ...
Evgeny Dudko's user avatar
1 vote
0 answers
468 views

How to add Multiple user acccount with check and SSH key using Bash script

Based on my requirement in my dev server, I have Created a Linux function that will create a dev user,(Take the user's first name and create a Linux user ) we have a devs group in our developer server,...
sam23's user avatar
  • 67
0 votes
2 answers
210 views

bash: colored output do not stop

I'm writing a password validator and after all the tests I need to give an answer to the user if the password is valid or not. If it is valid I will write the password in green color If it is NOT ...
Eylon Levi's user avatar
-1 votes
1 answer
194 views

Bash: How to find a specific char in a string

I have the assignment to write a bash script to validate password strength and one of the requirements is: Include both the small and capital case letters. The Password variable is the input, of ...
Eylon Levi's user avatar
0 votes
1 answer
2k views

Useradd script in linux without using passwd

I have to write a useradd script which adds a new user and sets for him a home directory. #!/bin/bash echo "Name:" read name echo "Password:" read password echo "Group:" ...
Matthew's user avatar
  • 85
1 vote
1 answer
2k views

How to give Users SUDO Permission from Bash Script [closed]

I have found a link (Bash Script) through which we can create Users in Linux. Problem is all the Users created from this script does not have SUDO Permission (root Permissions). Please help, Which and ...
Malik Adeel Imtiaz's user avatar
2 votes
1 answer
964 views

How can I pass a password to bash script

I'd like to write a bash script which automates a specific process. It starts an analyzing cms-tool with passing an identifier. After passing an identifier that tool is asking for user password. The ...
Jaw. M.'s user avatar
  • 149
1 vote
1 answer
452 views

bash script create users using csv

I'm trying to create different users from a csv file in bash. This my code so far: #create arrays usernames and password groups=(`cut -d: -f 1 "$filein"`) usernames=(`cut -d: -f 3 "$filein" |...
smart kinder's user avatar
1 vote
2 answers
4k views

bash generate secure password with no special characters

I have a daily bash process that requires using a new password everyday. To avoid dealing with special characters, I generate passwords using the MD5 of the product of two $RANDOM variables: md5sum &...
ooo's user avatar
  • 743
3 votes
1 answer
649 views

Linux tr command not working as expected

I have this password generator: pass () { # Generates a random password local size="${1:-12}" local alphabet="$2" </dev/urandom tr -dc "$alphabet" | head -c$size ; echo "" } Which ...
user avatar
3 votes
0 answers
2k views

Hide password and other secrets from process table (ps aux) during execution of command

Whichever command i execute using password and other secrets that appears/display while doing ps aux. For example: i want to connect with mysql db: /usr/bin/mysql -h hostname -u username --password=...
Ajay Gupta's user avatar
0 votes
2 answers
7k views

sudo su with user name, password and command

I am trying to do something like echo 'my_password' | sudo -S su -c some-user ./some_command I have looked at How can I apply password to sudo in one line command and execute su root? and run a ...
Chris Bolton's user avatar
  • 2,314
3 votes
4 answers
36k views

Change linux password with Ansible playbook script when connecting as a non-root user without sudo privileges

I am trying to change password for a non-root Linux user from Ansible playbook. To do so I tried to follow this link Following the instruction I can successfully change the password of a non-root ...
kuttumiah's user avatar
  • 555

15 30 50 per page