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 02-08-2020, 12:11 AM   #1
Fazzer1980
LQ Newbie
 
Registered: Feb 2020
Posts: 1

Rep: Reputation: Disabled
A few questions as I am doing a brief Fundamentals Linux course


Hi all could any one please explain to me the answer and also why this is so on some questions below.

You want kelly, trent, and lisa to be members of the group managers (GID 501).

How would you edit the managers entry in /etc/group to accomplish this goal?


managers:501:kelly trent lisa

managers:501:kelly:trent:lisa

managers:x:501:kelly:trent:lisa

managers:x:501:kelly,trent,lisa

managers:501:x:kelly\trent\lisa

Also this please as well

What is wrong with the following /etc/passwd file entry?

4kelly:x:1043:Kelly Bawson:/home/myhome:/bin/passwd

Select two answers:


The default shell is set to /bin/passwd, which is an invalid shell.

The username is invalid; Linux usernames can’t begin with a number

The home directory doesn’t match the username

Either the UID or the GID field is missing

The encrypted password is missing

and one more please

Which service is used to provide a more secure method to authenticate users in Linux?


PAM

LDAP

SSH

Shadow

thank you in advance for any answers and help as I am new I just a little rattled with it but the more I practice the better I will get.

Kind Regards
Fazzer1980
 
Old 02-08-2020, 12:43 AM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
In case your goal is to learn (you talk about practice, so I assume it is), here are a few suggestions that will lead you to the answers (and teach you something):

First question: Run the command man group.

Second question: Run the command man 5 passwd. Here are the important details:
Code:
Each line of the file describes a single user, and contains seven colon-separated fields:

   name:password:UID:GID:GECOS:directory:shell
...
name
   This is the user's login name. It should not contain capital letters.
password
   This is either the encrypted user password, an asterisk (*), or the letter aqxaq. 
   (See pwconv(8) for an explanation of aqxaq.)
...
directory
   This is the user's home directory: the initial directory where the user is placed after logging in. 
   The value in this field is used to set the HOME environment variable.
shell
   This is the program to run at login (if empty, use /bin/sh). 
   If set to a nonexistent executable, the user will be unable to login through login(1).
I don't have an answer to the third question. It's ill-designed. You use all of these services together, e.g. you can use PAM to configure shadow (if that can be considered a service), ssh and ldap. You can then use ssh with shadow and/or ldap.

Last edited by berndbausch; 02-08-2020 at 12:45 AM.
 
Old 02-08-2020, 03:43 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,322
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
There is also the program gpasswd which might be part of the answer.

Edit: one thing to note is that, regardless of what /etc/group shows, changes group membership do not take effect for an account until next login.

Last edited by Turbocapitalist; 02-08-2020 at 03:53 AM.
 
1 members found this post helpful.
  


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
LXer: LinuxCertified Announces its Next Linux Fundamentals course W/free Linux Laptop LXer Syndicated Linux News 0 05-12-2010 07:20 AM
LXer: LinuxCertified Announces its next "Linux Fundamentals" Course LXer Syndicated Linux News 0 08-02-2008 02:11 PM
LXer: LinuxCertified Announces its next "Linux Fundamentals" Course. LXer Syndicated Linux News 0 10-05-2007 03:20 PM
LXer: LinuxCertified Announces its next "Linux Fundamentals" course. LXer Syndicated Linux News 0 05-04-2006 11:21 AM
LXer: LinuxCertified Announces its Next "Linux Fundamentals" Course LXer Syndicated Linux News 0 02-01-2006 06:31 PM

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

All times are GMT -5. The time now is 06:18 AM.

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