Tag Info

New answers tagged

1

Yes. It's a bit technical, but you can log in without knowing the password. Boot the laptop. You'll get the GRUB screen for selecting your operating system before Linux boots. With the default option selected, press e. This will let you edit the script that boots the OS (not permanently). Use the arrow keys to go to the line that starts with "kernel" or ...


1

To generate the encrypted password you can use the perl function perl -e 'print crypt(" ","\$6\$saltsalt\$") . "\n"' which will give: 6$saltsalt$dbMv1WdXXWhYJXZCacilMdWabQOTCkYM.6OIQb/.md67MGEi2mORqm2dx6vAzJ.frP0Nm7m/c8lMQq5OFRTM0/ replace saltsalt by any random string Please note that you cannot put a plain text password in /etc/passwd or ...


0

In short, no. The formats of these files are very specific, and the password field strings are hashes which will have a minimum length of 8 characters, 16 or more on more modern versions that use stronger password hashing. If you're looking for a way to just put in a text string, look at the gecos field in /etc/passwd. If you want a way to have an ...


1

AIX's {smd5} format is a non-standard one. It's a minor variant of the *BSD/Linux/Solaris “MD5” (which is the one generated by openssl passwd -1). I wasn't able to find much information about it. There is code contributed to John the Ripper (present in the 1.8.0 jumbo version) that calculates it, in the file aix_smd5_fmt_plug.c. From reading the code, it ...


2

I think the best way is as is shown in Red Hat documentation. This is your second method. For GRUB2/RHEL7 single/emergency mode should not work since it will use sulogin to authenticate you before presenting the command prompt. So lets mark off different methods. For RHEL5, RHEL6, append 1, s or init=/bin/bash to kernel cmdline For RHEL 7, append ...


2

Requirements for which I will offer solutions, as bullet points: Passwordless root console login Passwordless root remote login from pre-authorised users Passwordless remote login for specified accounts from pre-authorised users Passwordless remote login for any account from pre-authorised users The following examples are based on Debian, since that's ...


0

You can also count users with passwords in linux using /etc/shadow file: awk 'BEGIN { FS=":"; empty = 0; cnt = 0; } { if ($2 !~ "!" && $2 !~ "*") { if ($2 !~ "") emty++; else cnt++; } } END { print "passwords: " cnt "\nempty passwords: " empty }' /etc/shadow On FreeBSD I think you can use /etc/master.passwd


1

To find the number of lines in a file, simply use wc. To look at user accounts on a system, I recommend getent passwd, though there are many other equally valid ways of getting at this information. You can combine the two by passing the output of getent through wc: # getent passwd | wc -l to get a number representing the total number of user accounts ...


2

The -l switch for passwd locks the user account by changing the password to a value which matches no possible encrypted value. Only root has access to passwd -l. Note that passwd -l does not keep the user from gaining access through other means such as authentication tokens (like SSH keys). To lock access to a user account: passwd -l username To ...


1

It is documented: $ man passwd ... -l, --lock Lock the password of the named account. This option disables a password by changing it to a value which matches no possible encrypted value (it adds a ´!´ at the beginning of the password). ... shadow-utils 4.1.5.1 07/26/2013 PASSWD(1) ...


2

I got this by issuing the passwd command at the CLI -l, --lock lock the password of the named account It locks the account so that root has to unlock the account before this person can log-in and use the account again. EDIT As it was indicated this is a duplicate of this


1

There are basically two ways to look at this: Never edit certain files without using the prescribed tools because you probably don't know what you're doing and that's ok because said tools know better and are always available. More realistically, you might as well break it now while you're thinking about it so you can plan ahead with a backup copy and ...


1

Based on Mark Plotnick's comment, vi passfile usermod -p `openssl passwd stdin < passfile` root rm -f passfile This gives you the opportunity to edit the temporary file and confirm that you have set the password to what you really think it is. It also keeps the password out of any history, etc.


2

I use this trick in scripts if an interactive prompt has to be used: yourpass='My supersecret password' $(echo $yourpass; echo $yourpass) | passwd username Basically assign the password to a variable and use that in the following command.


1

Try this one: # echo 'root:PASSWORD' | chpasswd Please replace PASSWORD with the one you want. It works well for me in Suse Linux.


2

You might be able to use some form of: # echo "Th3P@ssw0rd" | passwd --stdin theUser assuming your version of the passwd binary supports the --stdin option.


-1

When you type keys are stored in a buffer, when that buffer is filled you will start listening bips whenever you type extra caracters, those characters are discarded (if my memory serves me well). The next thing depends on what the first program that access that buffer do. If it first discards the buffer content a start reading your keystrokes will be ...


2

There are several reasons not to edit /etc/passwd, /etc/shadow, /etc/group, /etc/gshadow or /etc/sudoers directly, but rather use vipw, vigr or visudo: If you make a syntax error, you may not be able to log in or become root anymore. Using the viXXX tools reduces this risk because the tool makes sanity checks before modifying the file. If the file is ...


2

pam_cracklib provides the option 'dictpath'. pam_cracklib comes with a basic word list located at /usr/share/dict/cracklib-small. You can also use other, larger word list instead of the one provided.


1

It depends on how users change their passwords. If they just use passwd it's not hard for root user to replace an actual passwd binary with a compromised equivalent. Most people don't have a habit of obsessive checking whether passwd is a binary or a shell script or whether it comes from a legitimate source. But finally, the most important thing is that ...


1

Yes, of course. The superuser can replace the programs that read the user's password (login, passwd, …) by versions that do their job, plus write the password out to a log. The superuser can also replace the kernel by a kernel that modifies the way programs like ls, md5sum, lsof, etc. work so that they report the modified programs looking like the normal ...


0

Theoretically yes. The superuser can modify anything in the running System. That means also the Kernel and all binaries related to logging in, e.g. adding a call that sends the password to a website prior to it being hashed. In practice, this is useless, as you have pointed out yourself, which is why something like this will probably never happen.


0

Easy as 1-2-3: Get source code of shell the user is using Modify such that either everything is logged or just characters after passwd Compile and replace existing shell


0

I think you need to use the chage command Usage: chage [options] [LOGIN] Options: -d, --lastday LAST_DAY set date of last password change to LAST_DAY -E, --expiredate EXPIRE_DATE set account expiration date to EXPIRE_DATE -h, --help display this help message and exit -I, --inactive INACTIVE set password inactive ...


0

If this is a UNIX (HP UX) machine and not Linux then you will need to add rcommand to your pam.conf under the sshd account. sshd account sufficient /usr/lib/security/libpam_ldap.1 rcommand Otherwise you will get a password prompt that won't take when trying to ssh into the machine.


0

Another important consideration is password expiration. Just because SSH is set to enforce passwordless authentication does not mean that the login process will ignore passwords if told to check expiration. This is extremely important because there is not way to SSH into a server with a user account that has an expired password (from my own experience). ...


0

Your Samba password is irrelevant at login time. Your login password is still working for logging in, but your session is interrupted soon afterwards. The problem is not related to your Samba password, it's something else you must have done around the same time. Try logging in text mode: press Ctrl+Alt+F1 to switch to a text console. If that works, run ...


0

Assuming you're running something similar to RHEL/CentOS w/ OpenSSH, these are the things I typically do when going passwordless: Configure sshd_config to only accept pubkey authentication (PubkeyAuthentication yes, PasswordAuthentication no, ChallengeResponseAuthentication no, UsePAM no) Set all existing users to have a non-valid password (chpasswd -e ...


0

You may use the expect program to supply a response when the password is asked. Note this also has the security problem of hard-coding passwords and is usually better to set a sudo rule for the passwordless execution of the command.


0

It seems that you need to open a pty. You can try socat: echo pass | socat - exec:su.sh,pty,stderr,su=s3,ctty This way the password is not in the command line arguments, which would be a security issue. The better option would be to modify su.sh in the way that it does not need a password anymore.


0

Yes it is possible, but there is an opportunity to change the password by running up a new password file in /etc/passwd. I hope this helps. If not, try the probably more effective by less stable option of messing around with sshd_config, but I wouldn't recommend it unless you now what you are doing.


0

I have used Samba server long ago. After creating user and password for the user using the following command sudo smbpasswd -a user Before rebooting perform the following task. You have to add user to the smbuser file sudo vi /etc/samba/smbusers Add in the following line, substituting the username with the one you want to give access to. The format is ...


0

Login from your tty. Press Ctrl+Alt+F1 or F2 to get tty login. Try to login from there and try to change the things mentioned by Ruban. If still login doesn't work, that means there might be some issue with your /etc/pam.d/login file. The solution is to boot your system in single user mode and change the file as required.


4

If you check the manpage with "man mkpasswd", you will see that that command also accepts an optional parameter -S, --salt=STRING If you omit it, it will use a random salt value, and therefore the encrypted password value will also be different. If you provide the salt, mkpasswd -m sha-512 password -s "11223344" ...


0

in addition to layout and definition , provided in other answers , let us talk about the usage , ways to edit and retrieve information of these fields . first as described by Erathiel , debian systems have the adduser command , that will ask five questions and set the corresponding fields upon user creation . i remember suse have no adduser , and gentoo ...


-1

Each line of the file describes a single user, and contains seven colon-separated fields: name:password:UID:GID:**GECOS**:directory:shell The field are as follows: GECOS This field (sometimes called the "comment field") is optional and used only for informational purposes. Usually, it contains the full username. Some programs (for example, ...


0

How about using agent forwarding? You can enable it in /etc/ssh/ssh_config (or ~/.ssh/config): Host * ForwardAgent yes or add "-A" every time you connect to your proxy: ssh -A user@remote_host By enabling this, you allow your proxy to forward your key to your target machines, so you can freely connect to other machines.


2

This is just a comment, so you should not worry about it. From info passwd: Each line of the file describes a single user, and contains seven colon-separated fields: name:password:UID:GID:**GECOS**:directory:shell The field are as follows: GECOS This field (sometimes called the "comment field") is optional and used only for ...


12

You've partly answered your own question, probably not realising you did :) The clue is hidden within the field list and the excerpt from /etc/passwd you've provided. See how the fields in the passwd file are separated by a :? The commas there are a part of the User ID Info field and include the following data: Full Name, Room Number, Work Phone, Home Phone, ...


10

The 5th field is sometimes known as the "GECOS" field (it stands for "General Electric Comprehensive Operating System"), and it is typically used to record additional information about the user - real name, building or room number, phone number, and any additional contact information (fax, pager number, etc). These subfields are comma delimited. In your ...



Top 50 recent answers are included