I have seen people use passwd -l "$USERNAME" ,  But the linux man page does not explain what the -l option is for. What does it do ?
123751
Let's say I create a user named "bogus" using the adduser command. How can I make sure this user will NOT be a viable login option, without disabling the account. In short, I want the account to be accessible via su - bogus, but I do not want it to be accessible via a regular login prompt.  Searching around, it seems I need to disable that user's password, but doing passwd -d bogus didn't help. In fact, it made things worse, because I could now login to bogus without even typing a password.  Is there a way to disable regular logins for a given a account?  Note: Just to be clear, I know how to remove a user from the menu options of graphical login screens such as gdm, but these methods simply hide the account without actually disabling login. I'm looking for a way to disable regular login completely, text-mode included.
103643
I'm trying to wrap my mind around exactly how password reset procedures work in CentOS/RHEL 7 and I'm missing some fundamental knowledge.   In    I see that chroot /sysroot is necessary but I don't understand why or what this step is specifically doing.  Example verbiage:    (Source A) "5 – Now access the system with this command." (Source B) "BOOM. You are in single user mode. The shell prompt! --looks like :/# type chroot /sysroot" (Source C) "then use chroot to go into a chroot jail"   Suffice it to say, these procedures are a little sparse on explanation. :-(  Can someone please elaborate a little more?
796
Some time ago, when I installed Ubuntu, I chose a rather stupid username for my account that I do not want to use anymore. How do I change this (including the name of my home directory, and the name in the terminal) without losing settings for applications? How do I keep permissions and my keys for various authentification (e.g. email, SSH, GPG and more)? What settings could possibly get lost if I changed my username?
83812
I stupidly ran sudo rm /* followed by sudo rm -R /*  My sites still run, although the vast majority of commands like ls are now broken.  Is there a simple way to get data off the server or reverse some of damage?
40712
Edit: This is a duplicate of .  I don't have the reputation to close this question as duplicate.  I'm not referring to ~ as in the home directory but rather this:  $ ls ~foo/bar /some/mount/point/foo/bar   However if I attempt it with a different mount point, e.g.:  $ mount | ag "/dev " devfs on /dev (devfs, local, nobrowse) $ ls /dev/stdin /dev/stdin $ ls ~stdin zsh: no such user or named directory: stdin .  # bash has a similar error message:  ls: ~stdin: No such file or directory   What is the ~ called in this context?  How does it work?  Edit: More information based on some of the comments below:   I can attest that foo is not a username on my system. When attempting to autocomplete ls -lah ~ not all options are shown.  i.e. I'm able to cd ~qux, when qux doesn't show up in the autocomplete.  Again qux is not a user in my system. If it matters /some/mount/point is a network share. All of the details suggest some named path muckery, a Z shell feature of pathname expansion, but this works in bash as well, which apparently doesn't support things like the Z shell's named paths.
63198
I installed Kali Linux OS on my hard disk and set nothing as username and password. Now at the time of login it ask for localhost username and password. I tried root and toor as default but didn’t worked for me.
112556
I just put Ubuntu 15.04 on a flash drive using pendrivelinux, and when attempting to install it on my computer, it asks for a username and password.  What is the default username and password?  I haven't been able to find it anywhere on the web.  Thanks!
33821
I used to use '' and "" (single and double-quotes) interchangeably on the command line, but I recently noticed that '$HOME/some/dir' is not expanded, while "$HOME/some/dir" is. I searched around a little bit and found that "" allows some protection of special characters, while '' allows full protection. So what other characters are protected by '' and not ""?  EDIT: What are practical situations in which these differences might be significant?
36623
I want to run a command that requires the sudo password say:  sudo apt-get update   Isn't this supposed to work (I have stored the password in a normal text file passwd.txt):  sudo apt-get update &lt;~/passwd.txt   This is my logic for for why it SHOULD work: when the password is required, the user is asked to input the password from the keyboard. But redirecting the stdin to read from the passwd.txt file should work.  Shouldn't it?
11355
I'm writing a C Shell program that will be doing su or sudo or ssh. They all want their passwords in console input (the TTY) rather than stdin or the command line.  Does anybody know a solution?  Setting up password-less sudo is not an option.   could be an option, but it's not present on my stripped-down system.
34566
I have recently found an argument against disabling a root user login in Linux at   I assume that, if everybody uses a public key authentication, there's no risk at losing the root password.  Is it always better to disable the root login via ssh?
77169
Sometimes I see a command like  find . -name * -exec ls -a {} \;   I was asked to execute this.  What does {} \; mean here?
18398
Possible Duplicate:          I have a strange passwd- file in /etc, notice the trailing dash:  root@ubuntu:~# ls /etc/passw* /etc/passwd  /etc/passwd-   Notice the different permissions:  root@ubuntu:~# ls -hl /etc/passw* -rw-r--r-- 1 root root 2.0K Oct 26 13:38 /etc/passwd -rw------- 1 root root 1.9K Oct 26 13:38 /etc/passwd-   and the difference in content:  root@ubuntu:~# diff /etc/passwd{,-} 39c39 &lt; mysql:x:119:129:MySQL Server,,,:/nonexistent:/bin/false --- &gt; mysql:x:119:129::/nonexistent:/bin/false   What's happening here?  root@ubuntu:~# uname -a Linux ubuntu 3.2.0-29-generic-pae #46-Ubuntu SMP Fri Jul 27 17:25:43 UTC 2012 i686 i686 i386 GNU/Linux root@ubuntu:~# cat /etc/issue Ubuntu 12.04.1 LTS \n \l
91020
so i am following this tutorial as it is the only one i can find and any that i can find are the same as this one:    but when i type in the first command i gives me this  myname@myname-System-Product-Name ~ $ sudo wget -q -O- http://archive.getdeb.net/getdeb-archive.key | apt-key add - [sudo] password for myname: ERROR: This command can only be used by root.
32744
I am trying to set a master password from the terminal (using a shell script). I see the passwd function and the master.passwd function, however I don't see any documentation on either of these to set the master password (AFAIK, these set the user passwords only).  I am pulling my information from these sources:      My question is:  Can you use the passwd or master.passwd commands to set the master password? If so, can you please provide an example for how to accomplish this?
121396
What is $() in Linux Shell Commands?   For example:  chmod 777 $(pwd)
18955
I want to be able to 'su' to a specific user, allowing me to run any command without a password being entered.  For example:  If my login were user1 and the user I want to 'su' to is user2:  I would use the command:  su - user2  but then it prompts me with   Password: