Password for live USB with persistence












1















I recently used @Harsh 's mkusb instructions to successfully create an Ubuntu 18.04 live USB with persistence greater than 4 GB. The default user is Ubuntu and the default password is , that is to say blank (just hit enter).



Can I run the sudo passwd Ubuntu command and add an actual password to this live USB system? I want a password required on boot and on the lock screen as well. I don't know what issues this would present, if any. I do understand somebody could still mount my live USB system on another Linux machine, and have access to my files. My password requirement is a very low level of defense, that I'm comfortable with, and want.



Alternatively, could I simply delete the Ubuntu user, and add myself jason as the only user, create a password for jason, and be done with it?










share|improve this question

























  • Are this usb installation use something like squash fs for system files, or its plain ext4? Try to create new user, and check if it persist. If so, change password for Ubuntu.

    – LeonidMew
    Jan 22 at 15:58






  • 2





    You can add yourself as a new User to a persistent drive: Settings/Details/Users/ . From there add a password.

    – C.S.Cameron
    2 days ago











  • @C.S.Cameron I added myself as a new user and gave myself admin privileges. Is it OK to delete the original ubuntu user ID? Or is that some type of sudo ID that needs to stay?

    – Jason Hunter
    2 days ago













  • I don't usually bother to remove the Ubuntu user, I think it goes away by itself.

    – C.S.Cameron
    yesterday
















1















I recently used @Harsh 's mkusb instructions to successfully create an Ubuntu 18.04 live USB with persistence greater than 4 GB. The default user is Ubuntu and the default password is , that is to say blank (just hit enter).



Can I run the sudo passwd Ubuntu command and add an actual password to this live USB system? I want a password required on boot and on the lock screen as well. I don't know what issues this would present, if any. I do understand somebody could still mount my live USB system on another Linux machine, and have access to my files. My password requirement is a very low level of defense, that I'm comfortable with, and want.



Alternatively, could I simply delete the Ubuntu user, and add myself jason as the only user, create a password for jason, and be done with it?










share|improve this question

























  • Are this usb installation use something like squash fs for system files, or its plain ext4? Try to create new user, and check if it persist. If so, change password for Ubuntu.

    – LeonidMew
    Jan 22 at 15:58






  • 2





    You can add yourself as a new User to a persistent drive: Settings/Details/Users/ . From there add a password.

    – C.S.Cameron
    2 days ago











  • @C.S.Cameron I added myself as a new user and gave myself admin privileges. Is it OK to delete the original ubuntu user ID? Or is that some type of sudo ID that needs to stay?

    – Jason Hunter
    2 days ago













  • I don't usually bother to remove the Ubuntu user, I think it goes away by itself.

    – C.S.Cameron
    yesterday














1












1








1








I recently used @Harsh 's mkusb instructions to successfully create an Ubuntu 18.04 live USB with persistence greater than 4 GB. The default user is Ubuntu and the default password is , that is to say blank (just hit enter).



Can I run the sudo passwd Ubuntu command and add an actual password to this live USB system? I want a password required on boot and on the lock screen as well. I don't know what issues this would present, if any. I do understand somebody could still mount my live USB system on another Linux machine, and have access to my files. My password requirement is a very low level of defense, that I'm comfortable with, and want.



Alternatively, could I simply delete the Ubuntu user, and add myself jason as the only user, create a password for jason, and be done with it?










share|improve this question
















I recently used @Harsh 's mkusb instructions to successfully create an Ubuntu 18.04 live USB with persistence greater than 4 GB. The default user is Ubuntu and the default password is , that is to say blank (just hit enter).



Can I run the sudo passwd Ubuntu command and add an actual password to this live USB system? I want a password required on boot and on the lock screen as well. I don't know what issues this would present, if any. I do understand somebody could still mount my live USB system on another Linux machine, and have access to my files. My password requirement is a very low level of defense, that I'm comfortable with, and want.



Alternatively, could I simply delete the Ubuntu user, and add myself jason as the only user, create a password for jason, and be done with it?







live-usb password root persistent mkusb






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 22 at 15:53







Jason Hunter

















asked Jan 22 at 15:08









Jason HunterJason Hunter

357410




357410













  • Are this usb installation use something like squash fs for system files, or its plain ext4? Try to create new user, and check if it persist. If so, change password for Ubuntu.

    – LeonidMew
    Jan 22 at 15:58






  • 2





    You can add yourself as a new User to a persistent drive: Settings/Details/Users/ . From there add a password.

    – C.S.Cameron
    2 days ago











  • @C.S.Cameron I added myself as a new user and gave myself admin privileges. Is it OK to delete the original ubuntu user ID? Or is that some type of sudo ID that needs to stay?

    – Jason Hunter
    2 days ago













  • I don't usually bother to remove the Ubuntu user, I think it goes away by itself.

    – C.S.Cameron
    yesterday



















  • Are this usb installation use something like squash fs for system files, or its plain ext4? Try to create new user, and check if it persist. If so, change password for Ubuntu.

    – LeonidMew
    Jan 22 at 15:58






  • 2





    You can add yourself as a new User to a persistent drive: Settings/Details/Users/ . From there add a password.

    – C.S.Cameron
    2 days ago











  • @C.S.Cameron I added myself as a new user and gave myself admin privileges. Is it OK to delete the original ubuntu user ID? Or is that some type of sudo ID that needs to stay?

    – Jason Hunter
    2 days ago













  • I don't usually bother to remove the Ubuntu user, I think it goes away by itself.

    – C.S.Cameron
    yesterday

















Are this usb installation use something like squash fs for system files, or its plain ext4? Try to create new user, and check if it persist. If so, change password for Ubuntu.

– LeonidMew
Jan 22 at 15:58





Are this usb installation use something like squash fs for system files, or its plain ext4? Try to create new user, and check if it persist. If so, change password for Ubuntu.

– LeonidMew
Jan 22 at 15:58




2




2





You can add yourself as a new User to a persistent drive: Settings/Details/Users/ . From there add a password.

– C.S.Cameron
2 days ago





You can add yourself as a new User to a persistent drive: Settings/Details/Users/ . From there add a password.

– C.S.Cameron
2 days ago













@C.S.Cameron I added myself as a new user and gave myself admin privileges. Is it OK to delete the original ubuntu user ID? Or is that some type of sudo ID that needs to stay?

– Jason Hunter
2 days ago







@C.S.Cameron I added myself as a new user and gave myself admin privileges. Is it OK to delete the original ubuntu user ID? Or is that some type of sudo ID that needs to stay?

– Jason Hunter
2 days ago















I don't usually bother to remove the Ubuntu user, I think it goes away by itself.

– C.S.Cameron
yesterday





I don't usually bother to remove the Ubuntu user, I think it goes away by itself.

– C.S.Cameron
yesterday










1 Answer
1






active

oldest

votes


















1














Persistent live Ubuntu





  • I tested, and yes, you can remove the original ubuntu user after creating a custom user ID with a good password and admin (sudo) permissions.



    sudo add-apt-repository universe
    sudo apt update
    sudo apt install gnome-system-tools


    and you get a convenient tool to create a custom user,



    users-admin


    Remember the admin (sudo) permissions!








  • It is a good idea to set the permissions of your subdirectories (in your home directory) to only allow your own user to see them. And set the permissions for the files in a corresponding way.



    cd
    find * -type d -exec chmod 700 {} ;
    find * -type f -exec chmod 600 {} ;


    Using * instead of . excludes the hidden directories and files from these actions.






Test:



Logging in live-only, 'Try Ubuntu', does not give direct access to files saved in Documents. but the default ubuntu live has sudo permissions, and can access these files that way.



ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l
total 44
drwx------ 2 1000 1000 4096 Jan 24 20:28 Desktop
drwx------ 2 1000 1000 4096 Jan 24 20:58 Documents
drwx------ 2 1000 1000 4096 Jan 24 20:28 Downloads
drwx------ 2 1000 1000 4096 Jan 24 20:28 Music
drwx------ 2 1000 1000 4096 Jan 24 20:28 Pictures
drwx------ 2 1000 1000 4096 Jan 24 20:28 Public
drwx------ 2 1000 1000 4096 Jan 24 20:28 Templates
drwx------ 2 1000 1000 4096 Jan 24 20:28 Videos
-rw------- 1 1000 1000 8980 Jan 24 20:27 examples.desktop
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l Documents/
ls: cannot open directory 'Documents/': Permission denied
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo ls -l Documents/
total 8
-rw-r--r-- 1 1000 1000 7 Jan 24 20:54 hej
-rw-r--r-- 1 1000 1000 6 Jan 24 20:58 hi
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ cat Documents/hi
cat: Documents/hi: Permission denied
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo cat Documents/hi
hello
ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$


Installed Ubuntu in a USB pendrive





  • If you want security it is much better to create an installed system in your USB pendrive, installed like into an internal drive (but into a pendrive). See the instructions at the following link:



    How do I install Ubuntu to a USB key? (without using Startup Disk Creator).



  • If you wish, you can encrypt it (LVM with LUKS encryption). In that case, do it at the partitioning window during the installation.







share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111983%2fpassword-for-live-usb-with-persistence%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    1














    Persistent live Ubuntu





    • I tested, and yes, you can remove the original ubuntu user after creating a custom user ID with a good password and admin (sudo) permissions.



      sudo add-apt-repository universe
      sudo apt update
      sudo apt install gnome-system-tools


      and you get a convenient tool to create a custom user,



      users-admin


      Remember the admin (sudo) permissions!








    • It is a good idea to set the permissions of your subdirectories (in your home directory) to only allow your own user to see them. And set the permissions for the files in a corresponding way.



      cd
      find * -type d -exec chmod 700 {} ;
      find * -type f -exec chmod 600 {} ;


      Using * instead of . excludes the hidden directories and files from these actions.






    Test:



    Logging in live-only, 'Try Ubuntu', does not give direct access to files saved in Documents. but the default ubuntu live has sudo permissions, and can access these files that way.



    ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l
    total 44
    drwx------ 2 1000 1000 4096 Jan 24 20:28 Desktop
    drwx------ 2 1000 1000 4096 Jan 24 20:58 Documents
    drwx------ 2 1000 1000 4096 Jan 24 20:28 Downloads
    drwx------ 2 1000 1000 4096 Jan 24 20:28 Music
    drwx------ 2 1000 1000 4096 Jan 24 20:28 Pictures
    drwx------ 2 1000 1000 4096 Jan 24 20:28 Public
    drwx------ 2 1000 1000 4096 Jan 24 20:28 Templates
    drwx------ 2 1000 1000 4096 Jan 24 20:28 Videos
    -rw------- 1 1000 1000 8980 Jan 24 20:27 examples.desktop
    ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l Documents/
    ls: cannot open directory 'Documents/': Permission denied
    ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo ls -l Documents/
    total 8
    -rw-r--r-- 1 1000 1000 7 Jan 24 20:54 hej
    -rw-r--r-- 1 1000 1000 6 Jan 24 20:58 hi
    ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ cat Documents/hi
    cat: Documents/hi: Permission denied
    ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo cat Documents/hi
    hello
    ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$


    Installed Ubuntu in a USB pendrive





    • If you want security it is much better to create an installed system in your USB pendrive, installed like into an internal drive (but into a pendrive). See the instructions at the following link:



      How do I install Ubuntu to a USB key? (without using Startup Disk Creator).



    • If you wish, you can encrypt it (LVM with LUKS encryption). In that case, do it at the partitioning window during the installation.







    share|improve this answer




























      1














      Persistent live Ubuntu





      • I tested, and yes, you can remove the original ubuntu user after creating a custom user ID with a good password and admin (sudo) permissions.



        sudo add-apt-repository universe
        sudo apt update
        sudo apt install gnome-system-tools


        and you get a convenient tool to create a custom user,



        users-admin


        Remember the admin (sudo) permissions!








      • It is a good idea to set the permissions of your subdirectories (in your home directory) to only allow your own user to see them. And set the permissions for the files in a corresponding way.



        cd
        find * -type d -exec chmod 700 {} ;
        find * -type f -exec chmod 600 {} ;


        Using * instead of . excludes the hidden directories and files from these actions.






      Test:



      Logging in live-only, 'Try Ubuntu', does not give direct access to files saved in Documents. but the default ubuntu live has sudo permissions, and can access these files that way.



      ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l
      total 44
      drwx------ 2 1000 1000 4096 Jan 24 20:28 Desktop
      drwx------ 2 1000 1000 4096 Jan 24 20:58 Documents
      drwx------ 2 1000 1000 4096 Jan 24 20:28 Downloads
      drwx------ 2 1000 1000 4096 Jan 24 20:28 Music
      drwx------ 2 1000 1000 4096 Jan 24 20:28 Pictures
      drwx------ 2 1000 1000 4096 Jan 24 20:28 Public
      drwx------ 2 1000 1000 4096 Jan 24 20:28 Templates
      drwx------ 2 1000 1000 4096 Jan 24 20:28 Videos
      -rw------- 1 1000 1000 8980 Jan 24 20:27 examples.desktop
      ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l Documents/
      ls: cannot open directory 'Documents/': Permission denied
      ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo ls -l Documents/
      total 8
      -rw-r--r-- 1 1000 1000 7 Jan 24 20:54 hej
      -rw-r--r-- 1 1000 1000 6 Jan 24 20:58 hi
      ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ cat Documents/hi
      cat: Documents/hi: Permission denied
      ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo cat Documents/hi
      hello
      ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$


      Installed Ubuntu in a USB pendrive





      • If you want security it is much better to create an installed system in your USB pendrive, installed like into an internal drive (but into a pendrive). See the instructions at the following link:



        How do I install Ubuntu to a USB key? (without using Startup Disk Creator).



      • If you wish, you can encrypt it (LVM with LUKS encryption). In that case, do it at the partitioning window during the installation.







      share|improve this answer


























        1












        1








        1







        Persistent live Ubuntu





        • I tested, and yes, you can remove the original ubuntu user after creating a custom user ID with a good password and admin (sudo) permissions.



          sudo add-apt-repository universe
          sudo apt update
          sudo apt install gnome-system-tools


          and you get a convenient tool to create a custom user,



          users-admin


          Remember the admin (sudo) permissions!








        • It is a good idea to set the permissions of your subdirectories (in your home directory) to only allow your own user to see them. And set the permissions for the files in a corresponding way.



          cd
          find * -type d -exec chmod 700 {} ;
          find * -type f -exec chmod 600 {} ;


          Using * instead of . excludes the hidden directories and files from these actions.






        Test:



        Logging in live-only, 'Try Ubuntu', does not give direct access to files saved in Documents. but the default ubuntu live has sudo permissions, and can access these files that way.



        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l
        total 44
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Desktop
        drwx------ 2 1000 1000 4096 Jan 24 20:58 Documents
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Downloads
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Music
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Pictures
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Public
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Templates
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Videos
        -rw------- 1 1000 1000 8980 Jan 24 20:27 examples.desktop
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l Documents/
        ls: cannot open directory 'Documents/': Permission denied
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo ls -l Documents/
        total 8
        -rw-r--r-- 1 1000 1000 7 Jan 24 20:54 hej
        -rw-r--r-- 1 1000 1000 6 Jan 24 20:58 hi
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ cat Documents/hi
        cat: Documents/hi: Permission denied
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo cat Documents/hi
        hello
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$


        Installed Ubuntu in a USB pendrive





        • If you want security it is much better to create an installed system in your USB pendrive, installed like into an internal drive (but into a pendrive). See the instructions at the following link:



          How do I install Ubuntu to a USB key? (without using Startup Disk Creator).



        • If you wish, you can encrypt it (LVM with LUKS encryption). In that case, do it at the partitioning window during the installation.







        share|improve this answer













        Persistent live Ubuntu





        • I tested, and yes, you can remove the original ubuntu user after creating a custom user ID with a good password and admin (sudo) permissions.



          sudo add-apt-repository universe
          sudo apt update
          sudo apt install gnome-system-tools


          and you get a convenient tool to create a custom user,



          users-admin


          Remember the admin (sudo) permissions!








        • It is a good idea to set the permissions of your subdirectories (in your home directory) to only allow your own user to see them. And set the permissions for the files in a corresponding way.



          cd
          find * -type d -exec chmod 700 {} ;
          find * -type f -exec chmod 600 {} ;


          Using * instead of . excludes the hidden directories and files from these actions.






        Test:



        Logging in live-only, 'Try Ubuntu', does not give direct access to files saved in Documents. but the default ubuntu live has sudo permissions, and can access these files that way.



        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l
        total 44
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Desktop
        drwx------ 2 1000 1000 4096 Jan 24 20:58 Documents
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Downloads
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Music
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Pictures
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Public
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Templates
        drwx------ 2 1000 1000 4096 Jan 24 20:28 Videos
        -rw------- 1 1000 1000 8980 Jan 24 20:27 examples.desktop
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ ls -l Documents/
        ls: cannot open directory 'Documents/': Permission denied
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo ls -l Documents/
        total 8
        -rw-r--r-- 1 1000 1000 7 Jan 24 20:54 hej
        -rw-r--r-- 1 1000 1000 6 Jan 24 20:58 hi
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ cat Documents/hi
        cat: Documents/hi: Permission denied
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$ sudo cat Documents/hi
        hello
        ubuntu@ubuntu:/media/ubuntu/casper-rw/upper/home/tester$


        Installed Ubuntu in a USB pendrive





        • If you want security it is much better to create an installed system in your USB pendrive, installed like into an internal drive (but into a pendrive). See the instructions at the following link:



          How do I install Ubuntu to a USB key? (without using Startup Disk Creator).



        • If you wish, you can encrypt it (LVM with LUKS encryption). In that case, do it at the partitioning window during the installation.








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        sudodussudodus

        23.6k32874




        23.6k32874






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1111983%2fpassword-for-live-usb-with-persistence%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            How did Captain America manage to do this?

            迪纳利

            南乌拉尔铁路局