Howto edit mdm.conf to load X after removing sudo

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post please read this

Howto edit mdm.conf to load X after removing sudo

Postby zzz on Mon Oct 07, 2013 3:12 am

Removing sudo requires two commands in the following order:

apt-get remove sudo
apt-get remove libgksu2-0

If you switch the order of the last two commands, you may not be able to boot the next time and will have to format and restore the system partition.

When you boot the next time, will have to login before issuing command startx to load the X GUI.

If anyone on the forum knows how to modify the /etc/mdm/mdm.conf file to automatically login as guest user, please post instructions.

The following should work but doesn't:

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=guest
TimedLoginEnable=true
TimedLogin=guest
TimedLoginDelay=10
zzz
Level 1
Level 1
 
Posts: 5
Joined: Mon Oct 07, 2013 2:23 am

Linux Mint is funded by ads and donations.
 

Re: Howto edit mdm.conf to load X after removing sudo

Postby karlchen on Mon Oct 07, 2013 6:37 am

zzz wrote:If anyone on the forum knows how to modify the /etc/mdm/mdm.conf file to automatically login as guest user, please post instructions.

As you have removed sudo, you will have to resort to using su.
Code: Select all
su - root
mdmsetup
Inside mdmsetup locate the Security tab. It offers a way of activating and configuring the automatic login.

Karl
Image
Enlightened by Lucid Lynx, enchanted by Maya, impressed by Petra.
User avatar
karlchen
Level 9
Level 9
 
Posts: 2547
Joined: Sat Dec 31, 2011 7:21 am

Re: Howto edit mdm.conf to load X after removing sudo

Postby zzz on Mon Oct 07, 2013 1:25 pm

@karlchen, no thanks. Removed sudo because it is a security risk.

There must be a way to modify one of the configuration files to allow login to occur automatically into guest account as before removal of sudo since it is possible to login manually via terminal session and issue startx command.
zzz
Level 1
Level 1
 
Posts: 5
Joined: Mon Oct 07, 2013 2:23 am

Re: Howto edit mdm.conf to load X after removing sudo

Postby karlchen on Mon Oct 07, 2013 3:09 pm

Hi, zzz.

Where do you see a sudo command in my previous post? su is not the same as sudo.
So I guess you have not even tried what I suggested. OK. Your decision.

Karl
Image
Enlightened by Lucid Lynx, enchanted by Maya, impressed by Petra.
User avatar
karlchen
Level 9
Level 9
 
Posts: 2547
Joined: Sat Dec 31, 2011 7:21 am

Re: Howto edit mdm.conf to load X after removing sudo

Postby palo on Mon Oct 07, 2013 6:22 pm

How do you edit mdm after removing sudo when removing sudo also removes mdm?
Code: Select all
The following packages will be REMOVED:
  aptoncd apturl gdebi gksu mdm mintwelcome sudo ubuntu-minimal
  usb-imagewriter


Pat
~/mintmaya/xfce/enlightenment
Help Vampires: A Spotter's Guide
User avatar
palo
Level 4
Level 4
 
Posts: 418
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

Re: Howto edit mdm.conf to load X after removing sudo

Postby karlchen on Mon Oct 07, 2013 6:28 pm

palo wrote:How do you edit mdm after removing sudo when removing sudo also removes mdm?
No need to edit mdm.conf if mdm is gone. :wink:
Seems as if removing sudo from Mint is a really smart idea. - Yet, anybody feel free to shoot their own foot in case it makes them feel better. :lol:
Image
Enlightened by Lucid Lynx, enchanted by Maya, impressed by Petra.
User avatar
karlchen
Level 9
Level 9
 
Posts: 2547
Joined: Sat Dec 31, 2011 7:21 am

Re: Howto edit mdm.conf to load X after removing sudo

Postby zzz on Mon Oct 07, 2013 6:31 pm

@karlchen,

mdmsetup (as root) gave the following:

No command 'mdmsetup' found, did you mean:
Command 'dmsetup' from package 'dmsetup' (main)
mdmsetup: command not found

@palo,

you're correct. Removing sudo and libgksu2-0 leaves a very minimal MDM.
zzz
Level 1
Level 1
 
Posts: 5
Joined: Mon Oct 07, 2013 2:23 am

Re: Howto edit mdm.conf to load X after removing sudo

Postby karlchen on Mon Oct 07, 2013 6:39 pm

zzz wrote:@karlchen,
mdmsetup (as root) gave the following:
No command 'mdmsetup' found
The answer has been given in the post right above yours: As removing sudo will remove mdm, it will remove mdmsetp as well. Without mdm there is no need to worry about editing mdm.conf any longer.
The lesson from this thread is pretty trivial: Do not uninstall sudo.
Image
Enlightened by Lucid Lynx, enchanted by Maya, impressed by Petra.
User avatar
karlchen
Level 9
Level 9
 
Posts: 2547
Joined: Sat Dec 31, 2011 7:21 am

Re: Howto edit mdm.conf to load X after removing sudo

Postby zzz on Tue Oct 08, 2013 1:19 am

karlchen wrote:
zzz wrote:@karlchen,
mdmsetup (as root) gave the following:
No command 'mdmsetup' found
The answer has been given in the post right above yours: As removing sudo will remove mdm, it will remove mdmsetp as well. Without mdm there is no need to worry about editing mdm.conf any longer.
The lesson from this thread is pretty trivial: Do not uninstall sudo.


@karlchen, appreciate your help. I prefer no sudo. Thanks.
zzz
Level 1
Level 1
 
Posts: 5
Joined: Mon Oct 07, 2013 2:23 am

Re: Howto edit mdm.conf to load X after removing sudo

Postby karlchen on Tue Oct 08, 2013 4:05 am

zzz wrote:I prefer no sudo.
Then
+ simply do not use the command sudo and make sure no-one else does
+ make sure user root has got a valid password.
+ remove all normal users from the user group sudo. I.e. no-one will be able to use sudo.
+ whenever you need to run a command with root privileges you will have to use
Code: Select all
su root -c "commandline to be run"

+ but do not uninstall the software package sudo

Karl
Image
Enlightened by Lucid Lynx, enchanted by Maya, impressed by Petra.
User avatar
karlchen
Level 9
Level 9
 
Posts: 2547
Joined: Sat Dec 31, 2011 7:21 am

Linux Mint is funded by ads and donations.
 

Return to Other topics

Who is online

Users browsing this forum: No registered users and 3 guests