Quantcast

How to get rid of the live user after live install?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

How to get rid of the live user after live install?

heizi
I have noticed that the user "tux" remains if I use the live installer. I think it is a security risk,
because ssh  seems to be enabled by default and everyone can look up the password.
Greetings,
Thomas
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to get rid of the live user after live install?

Jiri Srain
Hi Thomas,

to remove the user, get inspired by the openSUSE live media.

The live installer is, so as regular installer, fully configurable. The
list of steps is described in /etc/YaST2/control.xml.

This file includes a step called "live_cleanup" (just grep for it),
which inserts /usr/share/YaST2/clients/inst_live_cleanup.ycp into the
workflow.

This YaST script calls /usr/bin/correct_live_install (which is, on
openSUSE, a regular shell script) and uninstalls the
yast2-live-installer package.

Therefore, all you should do is to review the control.xml file and add
the clean-up step and create the script which removes the user, or, if
needed, performs other actions. You might need to bring the
inst_live_cleanup.ycp file as well (take it from openSUSE and use
overlay) if it is not present.

I cannot provide more details (e.g. patch for control file), as I dont'
know which distro and version you are using.

Hope that helps,
   Jiri

Dne 9.3.2012 01:43, heizi napsal(a):

> I have noticed that the user "tux" remains if I use the live installer. I
> think it is a security risk,
> because ssh  seems to be enabled by default and everyone can look up the
> password.
> Greetings,
> Thomas
>
> --
> View this message in context: http://suse-studio-users.1598176.n2.nabble.com/How-to-get-rid-of-the-live-user-after-live-install-tp7356725p7356725.html
> Sent from the SUSE Studio Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: How to get rid of the live user after live install?

tertitten
In reply to this post by heizi
heizi wrote
I have noticed that the user "tux" remains if I use the live installer. I think it is a security risk,
because ssh  seems to be enabled by default and everyone can look up the password.
Greetings,
Thomas
Hi,
To remove the user tux you need to make a small script and place it in /usr/bin/ and make it executable in the overlay configuration. this file should be owned by root:root

The file name should be: correct_live_install
The contents should be:

#!/bin/bash
userdel tux
rm -rf /home/tux/

It deletes the user tux and then removes the home folder. /home/ should probably be replaced with something more secure in case the path to home is something completelly differen. . I dont know what it should be though.
Loading...