Tag Info

New answers tagged

0

How about gksudo? $ gksudo your_app_launcher.sh It does show a graphical dialog for safely entering the administrator password.


0

Debian 7.7 (Wheezy) Fluxbox 1.3.2-4 KeePass2 2.28 mono 2.10.8.1-8 xdotool 2.20110530.1 gnupg2 2.0.19-2+deb7u2 In my experience, KeePass2 version 2.28 is the first to auto-type into a terminal or non-gui program on Debian. I can auto-type into ssh or pinentry-curses from KeePass 2.28. Auto-type fails to work with pinentry-gtk-2 when I test it. I don't ...


-2

instead of echo password you have to use expect command: su and expect command


5

Consider setting up sudo for this particular process and perhaps set the specific command NOPASSWD: so that you do not have to echo a cleartext password (very bad in any event). Also, there are sudo flags that can allow you to either require or not require a TTY. Example. /etc/sudoers.d/mycmd: theuser ALL=(fgbs) NOPASSWD: cp fbgs.jar ...


1

The order of operations that causes the expired password prompt is as follows: SSH runs the PAM account stage, which verifies that the account exists and is valid. The account stage notices that the password has expired, and lets SSH know. SSH performs key-based authentication. It doesn't need PAM for this, so it doesn't run the auth stage. It then sets ...


0

Here's a one-off script for generating XKCD-style passphrases. /usr/share/dict/words isn't a great dictionary for this since most of the words are long, but it is easily available. For nicer passphrases you could use a dictionary of short words such as the S/Key One-Time Password word list. dict="/usr/share/dict/words" max="`wc -l <"$dict"`" \ perl ...


-1

Sometimes if your PC goes off to sleep, it takes time to resume. Check your power options.


1

I think you need rescue mode of your linux dist you didn't say what dist you're on but here's an example for Fedora/RH/CentOS: http://fedoraproject.org/wiki/How_to_reset_a_root_password


1

It's not only acceptable, but also preferable to have them have /bin/false as a login shell, else someone could actually long onto the system and get shell access. Remember to pass -s /bin/false to useradd to set the login shell to /bin/false


0

While it is not safe, please remember that Linux these days is in its early twenties - like with other things in IT the security implications were either not that clear back then or addressed later on. Hence, as mentioned in the other answers, do not use password on the command line. You can (and probably shold) also restrict the information provided by ...


14

The command line arguments of every process in the system is considered "public". Not just the w command, but ps and top and many other commands access that information as a matter of course. Indeed no special privileges are required to get that information. On Linux, you can read the command line of another process, even a process belonging to another user, ...


5

No, it's not safe to pass passwords to programs on the commandline. It's better to use: mohsen@debian:~$ mysql -uuser -p Enter password:


0

As DopeGhoti mentions, sudo asks for your user password, not the root password. If you have neither the root password nor the password of an account that has sudo rights, your next best bet is to reboot the server into maintenance mode, or if that doesn't work right, boot with init=/bin/sh as part of the kernel command line to change the root password.


-2

Maybe you have not set your root password. Try running: $ sudo passed


2

It is usually your personal login password. For example: derek$ sudo ls /var/log/secret [sudo] password for derek: <type derek's login password> audit.log audit.log.1 audit.log.2 This can be altered by policy files such as /etc/sudoers. See for example Set sudo password differently from login one


3

Python: python -c 'import crypt; print crypt.crypt("password", "$6$saltsalt$")' (for python 3 and greater it will be print(crypt.crypt(..., ...))) Perl: perl -e 'print crypt("password","\$6\$saltsalt\$") . "\n"' HTH


0

To set a password, just use passwd <username>.



Top 50 recent answers are included