Tagged: Debian Toggle Comment Threads | Keyboard Shortcuts

  • Mads Madsen 13:30 on February 16, 2019 Permalink | Reply
    Tags: Debian, Pi zero, Raspberry PI   

    Rename default pi user 

    After installing Raspbian Lite on a Raspberry PI, the default user pi is a liability. To fix this, a possibility is to create a new user and delete the old pi user, but I like recycling, so I’ll just rename the user.

    First we need to allow root login over ssh;

    1. Add PermitRootLogin yes to /etc/ssh/sshd_config
    2. Change the password of the root user $ sudo passwd root
    3. Restart ssh $ sudo service ssh restart

    Second login to the raspberry with root and execute the following;

    1. Kill all processes started by pi
      1. $ pkill -u pi
      2. $ pkill -9 -u pi
    2. $ usermod -l new_username pi
    3. $ groupmod -n new_username pi
    4. $ usermod -d /home/new_username new_username
    5. Remove PermitRootLogin yes from /etc/ssh/sshd_config
    6. Remove the root password $ passwd -d root
    7. Restart the raspberry pi $ reboot

  • Mads Madsen 01:44 on June 18, 2017 Permalink | Reply
    Tags: Debian, rsyslog   

    Make rsyslog log a specific program into its own log file and stop logging into syslog 

  • Mads Madsen 19:53 on February 13, 2014 Permalink | Reply
    Tags: , Debian, , uid, usermod   

    Change a user’s UID 

    First login as root – Clean login – sudo will not work if you’re changing a UID on an already logged in user.

    Find the user’s old UID:

    uid=1000(user1) ….

    Change the UID:

    Update files and directories owned by the user to the new UID:

    Reboot and the UID has been changed.

  • Mads Madsen 22:51 on April 17, 2013 Permalink | Reply
    Tags: , Debian, , , udev   

    Fixing eth numbering 

    While moving virtual machines around, it will usually mean a change on MAC addresses on the networking interfaces, which will create new eth nodes on the machine.
    Reasons for the renaming of eth nodes on the machine, is due to the persistent mapping on Linux systems using udev.
    Fixing this is done by removing the entities in the /etc/udev/rules.d/70-persistent-net.rules and reboot the machine.

Compose new post
Next post/Next comment
Previous post/Previous comment
Show/Hide comments
Go to top
Go to login
Show/Hide help
shift + esc