• Latest
  • Trending
  • All
  • Market Updates
  • Cryptocurrency
  • Blockchain
  • Investing
  • Commodities
  • Personal Finance
  • Technology
  • Business
  • Real Estate
  • Finance
Need to modify user accounts in Linux? This is the command for you

Need to modify user accounts in Linux? This is the command for you

September 16, 2025
UK July ILO unemployment rate 4.7% vs 4.7% expected

UK July ILO unemployment rate 4.7% vs 4.7% expected

September 16, 2025
A Stock to Buy Today

A Stock to Buy Today

September 16, 2025
KindlyMD Drops 55% As CEO Warns of Volatility

KindlyMD Drops 55% As CEO Warns of Volatility

September 16, 2025
Google thinks it can have AI summaries and a healthy web, too

Google thinks it can have AI summaries and a healthy web, too

September 16, 2025
ICYMI:US won’t impose China oil tariffs unless Europe acts, urges tougher Russian measures

ICYMI:US won’t impose China oil tariffs unless Europe acts, urges tougher Russian measures

September 16, 2025
Bitcoin scarcity jumps as miners hold – But a warning sign arises

Bitcoin scarcity jumps as miners hold – But a warning sign arises

September 16, 2025
How To Start a Print On Demand Side Hustle With $0

How To Start a Print On Demand Side Hustle With $0

September 16, 2025
PBOC is expected to set the USD/CNY reference rate at 7.1159 – Reuters estimate

PBOC is expected to set the USD/CNY reference rate at 7.1159 – Reuters estimate

September 16, 2025
TSLA, ALK, TXN, WDC and more

TSLA, ALK, TXN, WDC and more

September 15, 2025
SOL Aims For $300 As TradFi Adoption, DeFi Back Rally

SOL Aims For $300 As TradFi Adoption, DeFi Back Rally

September 15, 2025
Facebook’s settlement payments are on the way – here’s how much you can expect

Facebook’s settlement payments are on the way – here’s how much you can expect

September 15, 2025
Soft Manager – Trading Ideas – 5 August 2025

EA99 Controls – Input Guide – Other – 15 September 2025

September 15, 2025
Tuesday, September 16, 2025
No Result
View All Result
InvestorNewsToday.com
  • Home
  • Market
  • Business
  • Finance
  • Investing
  • Real Estate
  • Commodities
  • Crypto
  • Blockchain
  • Personal Finance
  • Tech
InvestorNewsToday.com
No Result
View All Result
Home Blockchain

Need to modify user accounts in Linux? This is the command for you

by Investor News Today
September 16, 2025
in Blockchain
0
Need to modify user accounts in Linux? This is the command for you
491
SHARES
1.4k
VIEWS
Share on FacebookShare on Twitter


gettyimages-1394117981-1

Trevor Williams/DigitalVision through Getty

Observe ZDNET: Add us as a most well-liked supply on Google.


The usermod command is brief for person modification, and, because the identify implies, lets you modify varied elements of a person account. 

For a Linux administrator, this command is essential. For Linux customers, the command most actually turns out to be useful, particularly given what it will possibly do.

Let’s dive down this rabbit gap and see what’s what with the Linux usermod command.

1. Change person particulars

Whenever you create a Linux person with the adduser command, you possibly can embrace sure particulars to associate with the brand new person (similar to full identify, workplace and residential cellphone numbers, and different data, which can be utilized as an outline. After you’ve got created the person, the one solution to change or add such data is through the usermod command. Say, for example, you need to add a remark for a person. To try this, you’ll subject the command:

sudo usermod -c “INFORMATION” USER

Additionally: 5 surprisingly productive issues you are able to do with the Linux terminal

The place INFORMATION is what you need to add, and USER is the person account you need to change.

This may be useful when you have two customers with the identical first identify and also you need to differentiate them of their person data. 

2. Change a username

You can too change a username. Earlier than you do that, know that it doesn’t change the person’s dwelling listing identify. So if I’ve the person sam and I need to change it to samantha, usermod is there to assist me. Such a command would seem like this:

sudo usermod -l samantha sam

The -l possibility is for the login identify.

3. Rename a house listing

After you modify a username, you may additionally need to rename the person’s dwelling listing. Earlier than you do that, you will need to be certain that the person is logged out; in any other case, it might wreak havoc on their account (or their information). You additionally must ensure that the person’s information is added to the brand new dwelling listing (in any other case, the person winds up with an empty dwelling). To alter a listing identify (and add the information), you’ll use a command like this (sticking with our sam/samantha instance):

sudo usermod -d /dwelling/samantha -m sam

The -d possibility units the brand new dwelling listing path, and the -m possibility strikes the information.

Additionally: There is a new coolest Linux distribution able to wow you 

4. Lock and unlock a person’s account

There could also be occasions when you’ll want to lock a person out of their account (and later enable them again in). This could possibly be used for non permanent workers or grounded youngsters. To lock a person account, the command could be:

sudo usermod -L USER

The place USER is the username to which the lock applies.

To unlock the account, you’ll subject the command:

sudo usermod -U USER

The place USER is the person account.

6. Change a person’s account expiry date

Do you know you possibly can expire a person account in Linux? For instance you could have a temp worker whose contract ends on October 31, 2025. If you wish to set the particular person’s person account to run out on that date (as an alternative of getting to recollect it when the date arrives), you need to use the expiry function of usermod like so:

sudo usermod -e 2025-10-31 USER

The place USER is the person account identify.

7. Add a person to a bunch (or teams)

I’ve had to make use of this function so many occasions. For instance, I take advantage of Docker lots, and after I set up it, I’ve so as to add customers to the group (in any other case it will not work for them with out utilizing sudo, which may result in safety points). You may need additionally created a bunch that will probably be utilized by a number of accounts to entry a particular folder. For instance you’ve got created the editorial group and need to add sam to it. The command for that will be:

sudo usermod -aG editorial sam

Additionally: 7 Linux terminal fundamentals each newbie ought to be taught first – and why

8. Modify a person’s dwelling listing

In case you’ve renamed a person account, you will discover their dwelling listing continues to be listed as the unique username. If you need to rename the person’s dwelling listing (to keep away from confusion), usermod has your again. Earlier than you do that, nonetheless, it is essential that you just be certain the person is logged out of their account (in any other case, it might trigger severe issues).

To alter the identify of a person’s dwelling listing, the command could be:

sudo usermod -d /dwelling/NEWNAME OLDNAME

The place NEWNAME is the brand new identify for the listing and OLDNAME is the present identify.

9. Change a person’s shell

Chances are high fairly slim that you’re going to ever want to do that, however you possibly can change a person’s shell. For instance you need to change samantha’s shell from bash to zsh. To try this, it’s best to first be certain the brand new shell is definitely put in with the command:

cat /and so forth/shells

If zsh is listed, you possibly can change it for samantha with the next command:

sudo usermod -s /bin/SHELL samantha

Wish to observe my work? Add ZDNET as a trusted supply on Google.



Source link

Tags: AccountscommandLinuxmodifyUser
Share196Tweet123
Previous Post

ICYMI:US won’t impose China oil tariffs unless Europe acts, urges tougher Russian measures

Next Post

Google thinks it can have AI summaries and a healthy web, too

Investor News Today

Investor News Today

Next Post
Google thinks it can have AI summaries and a healthy web, too

Google thinks it can have AI summaries and a healthy web, too

  • Trending
  • Comments
  • Latest
The human harbor: Navigating identity and meaning in the AI age

The human harbor: Navigating identity and meaning in the AI age

July 14, 2025
Private equity groups prepare to offload Ensemble Health for up to $12bn

Private equity groups prepare to offload Ensemble Health for up to $12bn

May 16, 2025
Equinor scales back renewables push 7 years after ditching ‘oil’ from its name

Equinor scales back renewables push 7 years after ditching ‘oil’ from its name

February 5, 2025
Niels Troost has a staggering story to tell about how he got sanctioned

Niels Troost has a staggering story to tell about how he got sanctioned

December 14, 2024
Why America’s economy is soaring ahead of its rivals

Why America’s economy is soaring ahead of its rivals

0
Dollar climbs after Donald Trump’s Brics tariff threat and French political woes

Dollar climbs after Donald Trump’s Brics tariff threat and French political woes

0
Nato chief Mark Rutte’s warning to Trump

Nato chief Mark Rutte’s warning to Trump

0
Top Federal Reserve official warns progress on taming US inflation ‘may be stalling’

Top Federal Reserve official warns progress on taming US inflation ‘may be stalling’

0
UK July ILO unemployment rate 4.7% vs 4.7% expected

UK July ILO unemployment rate 4.7% vs 4.7% expected

September 16, 2025
A Stock to Buy Today

A Stock to Buy Today

September 16, 2025
KindlyMD Drops 55% As CEO Warns of Volatility

KindlyMD Drops 55% As CEO Warns of Volatility

September 16, 2025
Google thinks it can have AI summaries and a healthy web, too

Google thinks it can have AI summaries and a healthy web, too

September 16, 2025

Live Prices

© 2024 Investor News Today

No Result
View All Result
  • Home
  • Market
  • Business
  • Finance
  • Investing
  • Real Estate
  • Commodities
  • Crypto
  • Blockchain
  • Personal Finance
  • Tech

© 2024 Investor News Today