LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2014, 12:56 PM   #1
inl1ner
LQ Newbie
 
Registered: Jul 2014
Posts: 5

Rep: Reputation: Disabled
Change username and/or authorization


hi @ all,

perhaps this is a strange question, because I could find nothing like this in the forum.

My username in linux mint is set up as a administrator. But now I really want to work as a standard user and set up a different user for administration.

When I try to set up an additional user as a administrator, mint does not respond. Click on the Add-button will be ignored without any message.

May I change the permissions for my user to standard and then configure an additional user as a administrator, or have I after this not the authority for configuring a administrator user next?

Regards
inl1ner
 
Old 07-18-2014, 01:05 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
I suggest you abandon the (in my opinion) horrible way that Ubuntu and Mint handle permissions, and go back to the standard Linux way. No account should be a global "administrator" except for root. In my opinion, the best thing to do would be to enable the root account on your machine, and then strip sudo access for your current "administrator" account to turn it into a regular account.

You can enable the root account by running:
Code:
sudo passwd root
and giving it a password

You can strip sudo access for your current "administrator" account by editing the /etc/sudoers file.

A proper setup means having a root account with a strong password, and then having regular user accounts with [if necessary] limited sudo access to the few commands they need to run on a regular basis that require elevated permissions.

Long answer to a simple question, but it does give you the answer you're looking for. It adds an "administrator" account (root, which should be the only administrator account), and drops your current account to a regular user.

Last edited by suicidaleggroll; 07-18-2014 at 01:09 PM.
 
Old 07-18-2014, 01:23 PM   #3
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,501

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
The primary user created during installation with Ubuntu/Mint is the administrator, has root privileges. It would seem to me that it would be simpler to create another regular user and use that. If you are using the GUI Users and Groups from the Control Center or System Settings, you should be prompted for a password when you click Add. If that isn't happening, I don't know what the problem is.
 
Old 07-18-2014, 03:47 PM   #4
inl1ner
LQ Newbie
 
Registered: Jul 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
@ suicidaleggroll
that seems to me to be an acceptable solution, but how do I edit sudoers?
After I switched on my brain and I typed in "sudo gedit sudoers" I could open the file.
Now I was completely at a loss, because:

# This file MUST be edited with the 'visudo' command as root.
# Please consider adding local content in /etc/sudoers.d/ instead of directly modifying this file.
# See the man page for details on how to write a sudoers file.
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.d

nothing to me ... sorry ... what am I supposed to change?

If I try it with "visudo sudoers" or "sudo visudo sudoers" appears "usage: visudo [-chqsV] [-f sudoers] [-x file]"
WTF ..
I feel so stupid ...


@yancek
well, is already correct, but accepted my name is yancek and the primary userid is also yancek, I would like to keep this already and do not create another which is my working name then.
How can I solve that?

Anyway, many thanks for your effort!
inl1ner
 
Old 07-18-2014, 04:28 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
What is the output if you type
Code:
id yancek
 
Old 07-18-2014, 05:00 PM   #6
inl1ner
LQ Newbie
 
Registered: Jul 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
Hi suicidaleggroll

as you see, my userid is peter. Anyway ...

peter@peter3 ~ $ id peter
uid=1000(peter) gid=1000(peter) Gruppen=1000(peter),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),110(sambashare)

If you like this says something ... wow

I'm going to bed anyway

good night
 
Old 07-18-2014, 05:07 PM   #7
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Sorry, you said in your previous post that your name and primary user is yancek.

Anyway, you should be able to drop to a regular user by removing your user account from the "sudo" group. If you notice in your sudoers post above, there's a line that says:
Code:
# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL
and then in your id post:
Code:
uid=1000(peter, gid=1000(peter) Gruppen=1000(peter)  ...  27(sudo)  ...
You can remove your user from the sudo group a few different ways, described here:
http://unix.stackexchange.com/questi...r-from-a-group
eg:
Code:
gpasswd -d peter sudo
 
Old 07-18-2014, 05:48 PM   #8
littlejoe5
Member
 
Registered: Aug 2006
Location: Arizona
Distribution: ubuntu dirivatives mostly Mate
Posts: 260

Rep: Reputation: 19
I use LinuxMint all the time for years now. I'm having a little trouble understanding what you mean that your account is strictly administrator. Since I am the only one that uses my computer, I have not investigated that much, but I do not usually work as "administrator" or "root".

I did download and install an OEM version of LinuxMint recently, and thought (from some peculiarities of the install procedure that it might have me as the administrator, but discovered that If I wanted to (for instance) install a program, that I still had to ask for root privileges ("sudo su", or "sudo password command"), so I was not working as administrator. But what I did discover is that the user number was some outlandish figure which I can't remember, so I went through the porcedure to get it ready to "ship to end user" or however it was worded on the icon on the desktop. The different end user number was interfering with me using the files made by myself on other distros for the past ten years.
 
Old 07-18-2014, 05:53 PM   #9
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
By "administrator" I'm sure he means that his regular user account is allowed to do anything it wants by simply sticking a "sudo" in front of it and typing in his own password. That's not asking for root privileges, that's akin to the Windows security model where you just click "OK" on the popup and it goes on to destroy your system.

When a user is allowed to do anything he feels like by sticking a "sudo" in front of the command, that IS an administrator account.

Disabling the root user and granting this admin ability arbitrarily to the first configured user without any say in the matter is as Windows-like as it gets.

Last edited by suicidaleggroll; 07-18-2014 at 05:57 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to change USERNAME in LQ ????? Gil@LQ Linux - General 2 05-07-2012 03:05 PM
ssmtp: Authorization failed (535 5.7.0 Incorrect username or password {mp049}) hhanff Linux - Software 2 10-20-2008 03:02 AM
username change? badfish81 LQ Suggestions & Feedback 2 11-12-2007 06:22 AM
Can I change my username? ssobeht LQ Suggestions & Feedback 19 10-14-2005 09:03 AM
username change nakkaya Linux - General 3 02-28-2003 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration