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 read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
zzz

Howto edit mdm.conf to load X after removing sudo

Post by zzz »

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
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

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
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
zzz

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

Post by zzz »

@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.
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

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
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
palo
Level 4
Level 4
Posts: 476
Joined: Mon Jun 25, 2012 7:28 am
Location: Walking on sunshine

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

Post by palo »

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
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

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
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
zzz

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

Post by zzz »

@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.
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

zzz wrote:@karlchen,
mdmsetup (as root) gave the following:
No command 'mdmsetup' found
The answer has been given [url=http://forums.linuxmint.com/viewtopic.php?p=772040#p772040]in the post right above yours[/url]: 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
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
zzz

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

Post by zzz »

karlchen wrote:
zzz wrote:@karlchen,
mdmsetup (as root) gave the following:
No command 'mdmsetup' found
The answer has been given [url=http://forums.linuxmint.com/viewtopic.php?p=772040#p772040]in the post right above yours[/url]: 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.
User avatar
karlchen
Level 23
Level 23
Posts: 18228
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

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

Post by karlchen »

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
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Locked

Return to “Other topics”