New answers tagged

3

It's possible for a user on the system (or a monitoring program that captures ps output) to see the password as a parameter to the groupadd process -- if the user or monitor "happens" to run ps while the groupadd process is running. The risk of that happening is small (the groupadd process will likely finish running fairly quickly), but non-zero. See an ...


0

You would probably have to look at the source for useradd to find out if it was even possible to specify no password. The "easy" way to do what you want is to use vipw to edit the password file, possibly to add the user manually, or possibly after having used useradd to do the initial record entry, and all you have to do is delete everything in the password ...


0

Having users without passwords is just a bad idea. Please assign passwords to all your users, especially "root". Every time you create a user without a password, a kitten dies. On many systems, a good password is often the first, the last and the only line of defense against the scum of the Internet. Please tell me you haven't done that on a machine ...


0

There's a way to store passwords in a bash script but you have to encrypt and obfuscate the script so that no one can actually read it or run any type of debugger on it to see exactly what it is doing. To encrypt and obfuscate a bash/shell script and have it actually be executable, try copying and pasting it here: ...


0

Disclaimer: IMHO, this is a very bad idea. You should not erase the password of an account. As explained here, you have to disable the password check in sudo, editing the sudo configuration file. Note that the order is important. You have to change sudo configuration before to erase the password. If it is to late, you can simply set a new password, change ...


1

Don't reinvent your own password store. Use an existing one. The Linux world has mostly converged on GNOME Keyring. Seahorse provides a convenient GUI for exploring and modifying the keyring and setting a master password. The keyring can be queried from the command line with the secret-tool utility. secret-tool store --label='Foobar webservice' service ...


2

You can to do it using passwd's -e option after creating the account. useradd has -e option for expiring a user account, not password. From man passwd: -e, --expire Immediately expire an account's password. This in effect can force a user to change his/her password at the user's next login.


1

I had a similar situation and used (abused?) gpg with public/private key encryption. The nice thing is that on most systems things are set up so that the access restricting password for a particular key is kept for 5 or 10 minutes, so you only have to type the password once then can go keep on using it and on non-use it will expire, much like sudo You can ...


0

Here you go: #!/bin/bash newTS=`date +%s` if test -r ~/.password then . ~/.password else TS=0 fi if test `expr $newTS - $TS` -gt 900 then # outdated password record rm -f ~/.password printf "Please enter your password: " read password printf "export TS=$newTS\nexport password=$password\n" > ...


5

In your case, you are safe - you've typed in a password and cancelled out of it. A password typed into login prompt followed by wrong password will be considered failed authentication and is partially recorded to btmp log. For tty console that's however alright. $ sudo lastb [sudo] password ...



Top 50 recent answers are included