0

I am running Ubuntu 17.10 where I have an root account. Since others will be using the computer, I would like them to have to log into another account. No problem there.

The challenge is that I would like this account to build on boot, possibly from an image and deleting the old account. The reason I would like to create it from an image is that I would like several programs to be installed with custom configuration.

Is there a way to do this within Ubuntu? or using bash or python scripts?

Program
  • 55
  • 9
  • In a Unix environment, applications are normally always installed for all users, so simply creating a new user should allow for what you want. And you can create users on demand using a pam module if that's what you want. – Daniel Pryden Feb 03 '18 at 14:10
  • Thank you for the comment. I have to look into pam modules, as I am not familiar with them. Even though applications are installed for all users, as far as I have tested, they are not set up. I wanted both all traces of the previous user removed, and a new environment set up for the next user. – Program Feb 03 '18 at 14:39
  • 3
    here are details on running a script on boot https://askubuntu.com/a/919059/18025 ... might be easier to have that boot script delete then recreate this reusable user account ... by default its home directory and /tmp are the only writable dirs for a non admin userid ... if this question gets closed perhaps its more appropriate over on the sibling site https://askubuntu.com/ ... have fun – Scott Stensland Feb 03 '18 at 15:12
  • Thanks! That looks like a great starting point, I can probably explore scripting a bit from here. I usually get a lot of hate when I ask "newbie" questions on this site, like when I am unfamiliar with notation etc., so thanks again for taking the time to answer :) – Program Feb 03 '18 at 18:27
  • 1
    If you need user-level configuration for an application, the normal Unix way is for that to be stored in hidden files in the user's home directory ("dot files"). On most systems, you can put extra dot files in `/etc/skel` to populate them into a new user directory. If you're concerned about user files interfering with each other, you can mount `/home` readonly, or use something like a `tmpfs` for `/home`. You probably need to explain more about how your users log in and what kind of applications they need to be able to use. – Daniel Pryden Feb 03 '18 at 19:44
  • Also: are you talking about multiple *simultaneous* users (e.g. ssh or vnc) or just multiple people logging into the same physical terminal? How worried are you about a technically proficient malicious user? Properly securing a machine against someone who is allowed to run arbitrary programs is *hard*. – Daniel Pryden Feb 03 '18 at 19:47
  • Thanks for the input. I am talking about several people using the same physical terminal. I am trying to protect it from unproficient users, since there will be a lot of installing different kinds of programs etc. The thought was that I could install programs as an admin, and just delete and make new users to "clean" the machine after use. But know I see that what I need is probably to make an .iso/image from the entire OS and just redeploy that weekly. – Program Feb 07 '18 at 14:34

0 Answers0