\nsudo systemctl set-default graphical.target\n<\/pre><\/div>\n\n\nAfter that a restart is necessary.Raspberry Pi Lock \/ Disable user and delete<\/strong>Deleting a user may cause one or the other to stop working as normal. In various places a user can be configured or preset. So it may be that, for example, entries in the “\/ etc \/ crontab” or “sudoers” need to be changed. One is therefore forced to make extensive adjustments if necessary. Therefore, it should usually be enough to disable a user.task<\/strong><\/p>\n\n\n\nLock or disable user.<\/li> Delete user.<\/li><\/ul>\n\n\n\nRoot privileges<\/strong><\/p>\n\n\n\nIt is recommended to work with root rights ..<\/p>\n\n\n
\nsudo -i\n<\/pre><\/div>\n\n\nYou can return to the previous session with “exit”.Solution: lock \/ unlock user<\/strong>If you just want to prevent the user from logging in, it will be enough to lock your password. That means he can not log in anymore.<\/p>\n\n\n\nusermod -L {USERNAME}\npasswd -l {USERNAME}\n<\/pre><\/div>\n\n\nFor internal processes (also cron jobs) the user can continue to be used.Solution: Delete user<\/strong>If you definitely want to delete a user, then the following procedure is recommended. First you save the user directory of the respective user. Before deleting, all processes that are still running under the user must be terminated.<\/p>\n\n\n\nkillall -u {USERNAME}\n<\/pre><\/div>\n\n\nThen you can really delete the user.<\/p>\n\n\n
\nuserdel -r {USERNAME}\n<\/pre><\/div>\n\n\nPlease note: There will be no return. You can set up the user again though. But that does not mean that he has the same rights and opportunities as before.<\/p>\n\n\n\n
Raspberry Pi Change user and root password<\/strong><\/p>\n\n\n\nEach standard installation has default users with default passwords. This must be the case so that the system administrator has the opportunity to gain access to the system during the first startup. Because standard users and their associated default passwords are publicly documented, they pose a significant security risk. If default passwords are not changed, then an attacker with the known password can gain access to the system. Therefore, after commissioning, the passwords of the standard users must be changed. For Raspberry Pi with Raspbian this is usually just “pi”. The root user usually has no password on Raspbian.<\/p>\n\n\n\n
task<\/strong><\/p>\n\n\n\nChange the password of the user “pi”.<\/li> Create password of the user “root”.<\/li> Delete the password of the user “root”.<\/li><\/ul>\n\n\n\nNote: Passwords are stored in the bash history<\/strong>If you change passwords via the command line, then the input is stored in plain text in the bash history on the hard disk via the keyboard. The bash history is located as a file in each user directory.\u00a0To prevent the recording of a command only occasionally, start the command with a “space”. The command is executed normally and the space is otherwise ignored.Note: Saving and writing passwords<\/strong>By the way, it’s ok to write down passwords. The only question is where this documentation is kept. So not under the desk pad, but better in a lockable cabinet.\u00a0By the way, ok is also a password manager. Although it is less beautiful that the access data are then in a single place. But that’s still better than using the same, perhaps unsafe, password everywhere.<\/p>\n\n\n\nSolution: Change user password of “pi”<\/strong><\/p>\n\n\n\nThe configuration program “raspi-config” makes it possible to change the password of the user “pi” very easily and quickly.<\/p>\n\n\n
\nsudo raspi-config\n<\/pre><\/div>\n\n\nAlternatively it is possible to make the change via the command line, if you are logged in as user “pi”. Note “spaces” at the beginning of the command.<\/p>\n\n\n
\npasswd\n<\/pre><\/div>\n\n\nOr if you want to change the password for another user. Note “spaces” at the beginning of the command.<\/p>\n\n\n
\nsudo passwd {USERNAME}\n<\/pre><\/div>\n\n\n“passwd” requires entering the old password and entering the new password twice. The new password will then be valid at the next login.Solution: Create root password<\/strong>First we switch to the user “root”.<\/p>\n\n\n\nsudo -i\n<\/pre><\/div>\n\n\nNow we have to set a password for “root”.<\/p>\n\n\n
\npasswd\n<\/pre><\/div>\n\n\nThe same procedure applies as with the user password. You can return to the previous session with “exit”.<\/p>\n\n\n\n
Solution: Delete root password<\/strong><\/p>\n\n\n\nSince you can get root privileges in Raspbian at any time with the user “pi” with the command line suffix “sudo”, you do not need a password for “root”. Once you have set it up, you can delete it as follows.<\/p>\n\n\n
\nsudo passwd -d root\n<\/pre><\/div>","protected":false},"excerpt":{"rendered":"Raspberry Pi user Setup how to Set up a new user Lock\/Disable user and delete or Change the Raspberry Pi user and root password<\/p>\n","protected":false},"author":2,"featured_media":3022,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"pgc_meta":"","_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[3],"tags":[101],"yoast_head":"\n
Raspberry Pi user setup - KaliTut<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n