• 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
Institutional FX Volumes Hit Three-Month High as Dollar Volatility Drives October Trading

Institutional FX Volumes Hit Three-Month High as Dollar Volatility Drives October Trading

November 4, 2025
Palantir Execs Reveal What Truly Sets Company Apart In AI Race: ‘We Build Software That Works, Not Software That Ought To Work’ – Palantir Technologies (NASDAQ:PLTR)

Palantir Execs Reveal What Truly Sets Company Apart In AI Race: ‘We Build Software That Works, Not Software That Ought To Work’ – Palantir Technologies (NASDAQ:PLTR)

November 4, 2025
Stocks making the biggest moves premarket: IREN, KVUE, CIFR, NGD

Stocks making the biggest moves premarket: IREN, KVUE, CIFR, NGD

November 4, 2025
SNB's Tschudin: We will only use negative rates when necessary

SNB's Tschudin: We will only use negative rates when necessary

November 4, 2025
Head And Shoulders Pattern Says Bitcoin Price Is Headed Below $100,000

Head And Shoulders Pattern Says Bitcoin Price Is Headed Below $100,000

November 4, 2025
Stream Finance Launches Probe After Reporting $93M Loss

Stream Finance Launches Probe After Reporting $93M Loss

November 4, 2025
Which cloud storage service should you buy in 2025? I compared the best options, and here’s my pick

Which cloud storage service should you buy in 2025? I compared the best options, and here’s my pick

November 4, 2025
All Money Will Go On Blockchain

All Money Will Go On Blockchain

November 4, 2025
RBA Governor to address a press conference after holding interest rate

RBA Governor to address a press conference after holding interest rate

November 4, 2025
Stocks making the biggest moves after hours: PLTR, HIMS, CLX

Stocks making the biggest moves after hours: PLTR, HIMS, CLX

November 4, 2025
HyperUnit Opens $55 Million Long Position in Bitcoin, Ether

HyperUnit Opens $55 Million Long Position in Bitcoin, Ether

November 4, 2025
Lyft CEO David Risher on paying drivers more and the shift to robotaxis

Lyft CEO David Risher on paying drivers more and the shift to robotaxis

November 4, 2025
Tuesday, November 4, 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
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
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
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
Institutional FX Volumes Hit Three-Month High as Dollar Volatility Drives October Trading

Institutional FX Volumes Hit Three-Month High as Dollar Volatility Drives October Trading

November 4, 2025
Palantir Execs Reveal What Truly Sets Company Apart In AI Race: ‘We Build Software That Works, Not Software That Ought To Work’ – Palantir Technologies (NASDAQ:PLTR)

Palantir Execs Reveal What Truly Sets Company Apart In AI Race: ‘We Build Software That Works, Not Software That Ought To Work’ – Palantir Technologies (NASDAQ:PLTR)

November 4, 2025
Stocks making the biggest moves premarket: IREN, KVUE, CIFR, NGD

Stocks making the biggest moves premarket: IREN, KVUE, CIFR, NGD

November 4, 2025
SNB's Tschudin: We will only use negative rates when necessary

SNB's Tschudin: We will only use negative rates when necessary

November 4, 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